kernel-ark/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
cpu
timers
apic.c
apm.c
asm-offsets.c
bootflag.c
cpuid.c
crash.c
dmi_scan.c
doublefault.c
early_printk.c
efi_stub.S
efi.c
entry.S
head.S
i386_ksyms.c
i387.c
i8237.c
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
irq.c
kprobes.c
ldt.c
machine_kexec.c
Makefile
mca.c
microcode.c
module.c
mpparse.c [PATCH] x86: MP_processor_info fix 2005-09-09 13:56:43 -07:00
msr.c
nmi.c
numaq.c
pci-dma.c
process.c
ptrace.c [PATCH] i386: seccomp fix for auditing/ptrace 2005-09-09 13:57:30 -07:00
quirks.c
reboot_fixups.c
reboot.c
relocate_kernel.S
scx200.c
semaphore.c
setup.c
sigframe.h [PATCH] __user annotations for pointers in i386 sigframe 2005-09-09 10:31:59 -07:00
signal.c
smp.c
smpboot.c
srat.c
summit.c
sys_i386.c
syscall_table.S
sysenter.c
time_hpet.c
time.c
trampoline.S
traps.c
vm86.c
vmlinux.lds.S
vsyscall-int80.S
vsyscall-note.S
vsyscall-sigreturn.S
vsyscall-sysenter.S
vsyscall.lds.S
vsyscall.S