linux-stable-rt/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
Makefile Merge linux-2.6 with linux-acpi-2.6 2005-09-08 01:45:47 -04:00
apic.c
apm.c
asm-offsets.c
bootflag.c
cpuid.c
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
efi.c [PATCH] i386: inline assembler: cleanup and encapsulate descriptor and task register management 2005-09-05 00:06:11 -07:00
efi_stub.S
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
i387.c
i8237.c [PATCH] ISA DMA suspend for i386 2005-09-05 00:06:14 -07:00
i8259.c
init_task.c
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
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
mca.c
microcode.c [PATCH] i386: cleanup serialize msr 2005-09-05 00:06:11 -07:00
module.c
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
pci-dma.c
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
reboot.c [PATCH] i386: inline assembler: cleanup and encapsulate descriptor and task register management 2005-09-05 00:06:11 -07:00
reboot_fixups.c
relocate_kernel.S
scx200.c
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
summit.c
sys_i386.c
syscall_table.S
sysenter.c
time.c [PATCH] NTP: ntp-helper functions 2005-09-07 16:57:34 -07:00
time_hpet.c
trampoline.S
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
vsyscall-note.S
vsyscall-sigreturn.S [PATCH] i386: clean up vDSO alignment padding 2005-09-05 00:06:10 -07:00
vsyscall-sysenter.S
vsyscall.S
vsyscall.lds.S