linux/arch/i386/kernel
Andrea Arcangeli 4c7fc7220f [PATCH] i386: seccomp fix for auditing/ptrace
This is the same issue as ppc64 before, when returning to userland we
shouldn't re-compute the seccomp check or the task could be killed during
sigreturn when orig_eax is overwritten by the sigreturn syscall.  This was
found by Roland.

This was harmless from a security standpoint, but some i686 users reported
failures with auditing enabled system wide (some distro surprisingly makes
it the default) and I reproduced it too by keeping the whole workload under
strace -f.

Patch is tested and works for me under strace -f.

nobody@athlon:~/cpushare> strace -o /tmp/o -f python seccomp_test.py
make: Nothing to be done for `seccomp_test'.
Starting computing some malicious bytecode
init
load
start
stop
receive_data failure
kill
exit_code 0 signal 9
The malicious bytecode has been killed successfully by seccomp
Starting computing some safe bytecode
init
load
start
stop
174 counts
kill
exit_code 0 signal 0
The seccomp_test.py completed successfully, thank you for testing.

(akpm: collaterally cleaned up a bit of do_syscall_trace() too)

Signed-off-by: Andrea Arcangeli <andrea@cpushare.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2005-09-09 13:57:30 -07:00
..
acpi Merge linux-2.6 with linux-acpi-2.6 2005-09-08 01:45:47 -04:00
cpu Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/cpufreq 2005-09-08 17:24:34 -07:00
timers [PATCH] Additions to .data.read_mostly section 2005-09-07 16:57:33 -07:00
apic.c [PATCH] x86: Remove obsolete get_cpu_vendor call 2005-08-18 12:53:59 -07:00
apm.c [PATCH] APM: Remove redundant call to set_cpus_allowed 2005-07-26 14:35:45 -07:00
asm-offsets.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
bootflag.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
cpuid.c [PATCH] class: convert arch/* to use the new class api instead of class_simple 2005-06-20 15:15:09 -07:00
crash.c [PATCH] x86: more asm cleanups 2005-09-05 00:06:12 -07:00
dmi_scan.c [PATCH] fix: dmi_check_system 2005-09-07 16:57:44 -07:00
doublefault.c [PATCH] i386: inline assembler: cleanup and encapsulate descriptor and task register management 2005-09-05 00:06:11 -07:00
early_printk.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
efi_stub.S Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
efi.c [PATCH] i386: inline assembler: cleanup and encapsulate descriptor and task register management 2005-09-05 00:06:11 -07:00
entry.S [PATCH] kprobes: prevent possible race conditions i386 changes 2005-09-07 16:57:59 -07:00
head.S [PATCH] kdump: Save parameter segment in protected mode (x86) 2005-09-05 00:06:09 -07:00
i386_ksyms.c [PATCH] Remove i386_ksyms.c, almost. 2005-06-23 09:45:11 -07:00
i387.c x86: make restore_fpu() use alternative assembler instructions 2005-07-22 16:06:16 -04:00
i8237.c [PATCH] ISA DMA suspend for i386 2005-09-05 00:06:14 -07:00
i8259.c [PATCH] kexec: x86: i8259 shutdown: disable interrupts 2005-06-25 16:24:46 -07:00
init_task.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
io_apic.c [PATCH] Fix misspelled i8259 typo in io_apic.c 2005-09-09 10:37:10 -07:00
ioport.c [PATCH] x86: make IOPL explicit 2005-09-05 00:06:12 -07:00
irq.c [PATCH] cpu state clean after hot remove 2005-06-25 16:24:30 -07:00
kprobes.c [PATCH] kprobes: fix bug when probed on task and isr functions 2005-09-07 16:58:01 -07:00
ldt.c [PATCH] x86: introduce a write acessor for updating the current LDT 2005-09-05 00:06:13 -07:00
machine_kexec.c [PATCH] x86: more asm cleanups 2005-09-05 00:06:12 -07:00
Makefile Merge linux-2.6 with linux-acpi-2.6 2005-09-08 01:45:47 -04:00
mca.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
microcode.c [PATCH] i386: cleanup serialize msr 2005-09-05 00:06:11 -07:00
module.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
mpparse.c [PATCH] x86: MP_processor_info fix 2005-09-09 13:56:43 -07:00
msr.c [PATCH] x86: more asm cleanups 2005-09-05 00:06:12 -07:00
nmi.c [PATCH] detect soft lockups 2005-09-07 16:57:17 -07:00
numaq.c [PATCH] re-disable TSC on NUMAQ 2005-07-28 21:46:05 -07:00
pci-dma.c [PATCH] Remove i386_ksyms.c, almost. 2005-06-23 09:45:11 -07:00
process.c [PATCH] x86: make IOPL explicit 2005-09-05 00:06:12 -07:00
ptrace.c [PATCH] i386: seccomp fix for auditing/ptrace 2005-09-09 13:57:30 -07:00
quirks.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
reboot_fixups.c [PATCH] x86 reboot: Add reboot fixup for gx1/cs5530a 2005-05-01 08:58:49 -07:00
reboot.c [PATCH] i386: inline assembler: cleanup and encapsulate descriptor and task register management 2005-09-05 00:06:11 -07:00
relocate_kernel.S [PATCH] kexec: x86 kexec core 2005-06-25 16:24:49 -07:00
scx200.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
semaphore.c [PATCH] unify x86/x86-64 semaphore code 2005-09-05 00:06:14 -07:00
setup.c Merge linux-2.6 with linux-acpi-2.6 2005-09-08 01:45:47 -04:00
sigframe.h [PATCH] __user annotations for pointers in i386 sigframe 2005-09-09 10:31:59 -07:00
signal.c [PATCH] x86: privilege cleanup 2005-09-05 00:06:12 -07:00
smp.c [PATCH] i386: inline asm cleanup 2005-09-05 00:06:11 -07:00
smpboot.c [PATCH] i386 boottime for_each_cpu broken 2005-09-05 00:06:13 -07:00
srat.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
summit.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
sys_i386.c Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
syscall_table.S [PATCH] remove sys_set_zone_reclaim() 2005-08-01 10:03:56 -07:00
sysenter.c [PATCH] sep initializing rework 2005-06-25 16:24:29 -07:00
time_hpet.c [PATCH] CPU hotplug: fix hpet sectioning 2005-06-25 16:24:28 -07:00
time.c [PATCH] NTP: ntp-helper functions 2005-09-07 16:57:34 -07:00
trampoline.S Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
traps.c [PATCH] kprobes: prevent possible race conditions i386 changes 2005-09-07 16:57:59 -07:00
vm86.c [PATCH] i386: inline assembler: cleanup and encapsulate descriptor and task register management 2005-09-05 00:06:11 -07:00
vmlinux.lds.S [PATCH] kprobes: prevent possible race conditions i386 changes 2005-09-07 16:57:59 -07:00
vsyscall-int80.S Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
vsyscall-note.S [PATCH] i386 vDSO: add PT_NOTE segment 2005-04-16 15:24:48 -07:00
vsyscall-sigreturn.S [PATCH] i386: clean up vDSO alignment padding 2005-09-05 00:06:10 -07:00
vsyscall-sysenter.S Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
vsyscall.lds.S [PATCH] i386 vDSO: add PT_NOTE segment 2005-04-16 15:24:48 -07:00
vsyscall.S Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00