Module Name: src Committed By: martin Date: Thu Jan 2 09:50:34 UTC 2020
Modified Files: src/sys/compat/common [netbsd-9]: kern_sig_43.c src/sys/compat/netbsd32 [netbsd-9]: netbsd32_compat_20.c netbsd32_compat_43.c netbsd32_compat_50.c Log Message: Pull up following revision(s) (requested by maxv in ticket #597): sys/compat/common/kern_sig_43.c: revision 1.36 sys/compat/netbsd32/netbsd32_compat_20.c: revision 1.39 sys/compat/netbsd32/netbsd32_compat_43.c: revision 1.59 sys/compat/netbsd32/netbsd32_compat_50.c: revision 1.44 Fix sizeof mismatch in copyin. This leads to a user-triggerable stack overflow. On my test build at least, by luck, the compiler orders the variables in a way that the overflow hits only local structures which haven't yet been initialized and used, so the overflow is harmless. Very easily seeable with kASan - just invoke the syscall from a 32bit binary. Fix three stack info leaks, found by kMSan when just invoking all syscalls with a zero page as argument. MSan: Uninitialized Stack Memory In copyout() At Offset 0, Variable 'sb32' From compat_20_netbsd32_getfsstat() MSan: Uninitialized Stack Memory In copyout() At Offset 12, Variable 'oss' From compat_43_sys_sigstack() MSan: Uninitialized Stack Memory In copyout() At Offset 0, Variable 'sb' From compat_50_netbsd32___fhstat40() To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.35.4.1 src/sys/compat/common/kern_sig_43.c cvs rdiff -u -r1.38 -r1.38.4.1 src/sys/compat/netbsd32/netbsd32_compat_20.c cvs rdiff -u -r1.57.4.1 -r1.57.4.2 \ src/sys/compat/netbsd32/netbsd32_compat_43.c cvs rdiff -u -r1.39.2.1 -r1.39.2.2 \ src/sys/compat/netbsd32/netbsd32_compat_50.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.