History log of /src/sys/compat/common/vfs_syscalls_30.c |
Revision | | Date | Author | Comments |
1.45 |
| 12-Mar-2022 |
riastradh | compat_30: Fix thinko in previous.
Let's not go into an infinite loop of stack smashing!
|
1.44 |
| 12-Mar-2022 |
riastradh | compat_30: Avoid what might be technically undefined behaviour.
Not sure advancing a user pointer by one for the purpose of making an equality test fail later on is actually likely to be a problem, but let's just pacify the sanitizer.
Reported-by: syzbot+758b18164c5c444f4249@syzkaller.appspotmail.com
|
1.43 |
| 07-Sep-2021 |
riastradh | sys/compat: Memset zero before copyout.
Just in case of uninitialized padding which would lead to kernel stack disclosure. If the compiler can prove the memset redundant then it can optimize it away; otherwise better safe than sorry.
|
1.42 |
| 15-Aug-2021 |
christos | - memset struct stat to avoid kernel memory disclosure of padded fields (thanks Trend Micro for the report) - use do_fhstat - consistency in argument order of compat functions
|
1.41 |
| 31-Jan-2020 |
maxv | Fix copyout overflows in fhstat, found by the LGTM bot. Not a big problem since this syscall is privileged.
|
1.40 |
| 17-Jan-2020 |
ad | VFS_VGET(), VFS_ROOT(), VFS_FHTOVP(): give them a "int lktype" argument, to allow us to get shared locks (or no lock) on the returned vnode. Matches FreeBSD.
|
1.39 |
| 22-Sep-2019 |
christos | branches: 1.39.2; Add a new member to struct vfsstat and grow the unused members The new member is caled f_mntfromlabel and it is the dkw_wname of the corresponding wedge. This is now used by df -W to display the mountpoint name as NAME=
|
1.38 |
| 27-Jan-2019 |
pgoyette | branches: 1.38.4; Merge the [pgoyette-compat] branch
|
1.37 |
| 03-Sep-2018 |
riastradh | Rename min/max -> uimin/uimax for better honesty.
These functions are defined on unsigned int. The generic name min/max should not silently truncate to 32 bits on 64-bit systems. This is purely a name change -- no functional change intended.
HOWEVER! Some subsystems have
#define min(a, b) ((a) < (b) ? (a) : (b)) #define max(a, b) ((a) > (b) ? (a) : (b))
even though our standard name for that is MIN/MAX. Although these may invite multiple evaluation bugs, these do _not_ cause integer truncation.
To avoid `fixing' these cases, I first changed the name in libkern, and then compile-tested every file where min/max occurred in order to confirm that it failed -- and thus confirm that nothing shadowed min/max -- before changing it.
I have left a handful of bootloaders that are too annoying to compile-test, and some dead code:
cobalt ews4800mips hp300 hppa ia64 luna68k vax acorn32/if_ie.c (not included in any kernels) macppc/if_gm.c (superseded by gem(4))
It should be easy to fix the fallout once identified -- this way of doing things fails safe, and the goal here, after all, is to _avoid_ silent integer truncations, not introduce them.
Maybe one day we can reintroduce min/max as type-generic things that never silently truncate. But we should avoid doing that for a while, so that existing code has a chance to be detected by the compiler for conversion to uimin/uimax without changing the semantics until we can properly audit it all. (Who knows, maybe in some cases integer truncation is actually intended!)
|
1.36 |
| 20-Oct-2014 |
christos | branches: 1.36.12; 1.36.18; 1.36.20; simplify
|
1.35 |
| 20-Oct-2014 |
maxv | Memory leak, triggerable from root only.
Found by my code scanner.
ok christos@
|
1.34 |
| 05-Sep-2014 |
matt | Try not to use f_data, use f_{vnode,socket,pipe,mqueue,kqueue,ksem} to get a correctly typed pointer.
|
1.33 |
| 19-Nov-2010 |
dholland | branches: 1.33.18; 1.33.34; Introduce struct pathbuf. This is an abstraction to hold a pathname and the metadata required to interpret it. Callers of namei must now create a pathbuf and pass it to NDINIT (instead of a string and a uio_seg), then destroy the pathbuf after the namei session is complete.
Update all namei call sites accordingly. Add a pathbuf(9) man page and update namei(9).
The pathbuf interface also now appears in a couple of related additional places that were passing string/uio_seg pairs that were later fed into NDINIT. Update other call sites accordingly.
|
1.32 |
| 24-Jun-2010 |
hannken | Clean up vnode lock operations pass 2:
VOP_UNLOCK(vp, flags) -> VOP_UNLOCK(vp): Remove the unneeded flags argument.
Welcome to 5.99.32.
Discussed on tech-kern.
|
1.31 |
| 03-Mar-2010 |
he | branches: 1.31.2; When implementing "read directory", when there are too many empty entries in a row, and we need to try to read the next block, and have passed a non-NULL cookie pointer to VOP_READDIR, ensure that we free the cookie buffer before re-doing VOP_READDIR, so that we don't leak memory. This fix is similar to nfs_serv.c revisions 1.115 + 1.124.
This should fix the long-standing problem observed by e.g. using Linux- emulated programs to take backup of servers, which is one of the problems which were reported in PR#42661.
Thanks to pooka@ for the hints for traversing the VOP* layer.
|
1.30 |
| 26-Jan-2009 |
njoly | branches: 1.30.4; Make all fstat(2) compat syscalls consistently use do_sys_fstat(), instead of fd_getfile()/fd_putfile() dance.
ok by christos.
|
1.29 |
| 11-Jan-2009 |
christos | merge christos-time_t
|
1.28 |
| 24-Jun-2008 |
ad | branches: 1.28.4; 1.28.6; 1.28.12; Replace references to getsock/getvnode.
|
1.27 |
| 28-Apr-2008 |
martin | branches: 1.27.2; 1.27.4; Remove clause 3 and 4 from TNF licenses
|
1.26 |
| 21-Mar-2008 |
ad | branches: 1.26.2; 1.26.4; 1.26.6; Catch up with descriptor handling changes. See kern_descrip.c revision 1.173 for details.
|
1.25 |
| 20-Dec-2007 |
dsl | branches: 1.25.6; Convert all the system call entry points from: int foo(struct lwp *l, void *v, register_t *retval) to: int foo(struct lwp *l, const struct foo_args *uap, register_t *retval) Fixup compat code to not write into 'uap' and (in some cases) to actually pass a correctly formatted 'uap' structure with the right name to the next routine. A few 'compat' routines that just call standard ones have been deleted. All the 'compat' code compiles (along with the kernels required to test build it). 98% done by automated scripts.
|
1.24 |
| 08-Dec-2007 |
pooka | branches: 1.24.4; Remove cn_lwp from struct componentname. curlwp should be used from on. The NDINIT() macro no longer takes the lwp parameter and associates the credentials of the calling thread with the namei structure.
|
1.23 |
| 30-Apr-2007 |
dsl | branches: 1.23.6; 1.23.8; 1.23.16; Split the statvfs functions so that the 'work' is done to a kernel buffer which can either be copied directly to userspace, or converted then copied. Saves replicating a lot of code in the compat functions (esp. for getvfsstat) at a cast of an extra function call in the non-emulated case - which is unlikely to be measurable given the other costs of the actions involved (even on vax). Remove dofhstat() and dofhstatvfs() (and the last caller). Remove some redundant stackgap_init() calls.
|
1.22 |
| 22-Apr-2007 |
dsl | Change the way that emulations locate files within the emulation root to avoid having to allocate space in the 'stackgap' - which is very LWP unfriendly. The additional code for non-emulation namei() is trivial, the reduction for the emulations is massive. The vnode for a processes emulation root is saved in the cwdi structure during process exec. If the emulation root the TRYEMULROOT flag are set, namei() will do an initial search for absolute pathnames in the emulation root, if that fails it will retry from the normal root. ".." at the emulation root will always go to the real root, even in the middle of paths and when expanding symlinks. Absolute symlinks found using absolute paths in the emulation root will be relative to the emulation root (so /usr/lib/xxx.so -> /lib/xxx.so links inside the emulation root don't need changing). If the root of the emulation would be returned (for an emulation lookup), then the real root is returned instead (matching the behaviour of emul_lookup, but being a cheap comparison here) so that programs that scan "../.." looking for the root dircetory don't loop forever. The target for symbolic links is no longer mangled (it used to get the CHECK_ALT_xxx() treatment, so could get /emul/xxx prepended). CHECK_ALT_xxx() are no more. Most of the change is deleting them, and adding TRYEMULROOT to the flags to NDINIT(). A lot of the emulation system call stubs could now be deleted.
|
1.21 |
| 10-Mar-2007 |
dsl | branches: 1.21.2; 1.21.4; Use the support routines from kern_syscalls.c instead of rolling our own code.
|
1.20 |
| 04-Mar-2007 |
christos | Kill caddr_t; there will be some MI fallout, but it will be fixed shortly.
|
1.19 |
| 09-Feb-2007 |
ad | branches: 1.19.2; Merge newlock2 to head.
|
1.18 |
| 16-Nov-2006 |
christos | branches: 1.18.2; __unused removal on arguments; approved by core.
|
1.17 |
| 14-Nov-2006 |
elad | Clean some KAUTH_GENERIC_ISSUSER usage in compat code.
|
1.16 |
| 12-Oct-2006 |
christos | - sprinkle __unused on function decls. - fix a couple of unused bugs - no more -Wno-unused for i386
|
1.15 |
| 04-Aug-2006 |
yamt | branches: 1.15.4; 1.15.6; compat_30_sys_getfh: check the size of filehandle. remove an unnecessary cast.
|
1.14 |
| 04-Aug-2006 |
yamt | some filehandle syscall related changes.
- remove the support of variable-sized filehandle from compat version of syscalls. (strictly speaking, it breaks abi. i don't think it's a problem because this feature is short-lived and there are no affected in-tree filesystems.) - unify vfs_copyinfh_alloc and vfs_copyinfh_alloc_size. - vfs_copyinfh_alloc_size: check fhsize strictly. - reduce code duplication between compat and current syscalls.
|
1.13 |
| 31-Jul-2006 |
martin | Make filehandles opaque to userland
|
1.12 |
| 23-Jul-2006 |
ad | Use the LWP cached credentials where sane.
|
1.11 |
| 13-Jul-2006 |
yamt | compat_30_sys_getfh: s/fhandle_t/struct compat_30_fhandle/ (fix overrun.)
|
1.10 |
| 13-Jul-2006 |
martin | Fix alignement problems for fhandle_t, exposed by gcc4.1.
While touching all vptofh/fhtovp functions, get rid of VFS_MAXFIDSIZ, version the getfh(2) syscall and explicitly pass the size available in the filehandle from userland.
Discussed on tech-kern, with lots of help from yamt (thanks!).
|
1.9 |
| 14-May-2006 |
elad | branches: 1.9.4; 1.9.6; integrate kauth.
|
1.8 |
| 04-May-2006 |
christos | fhstat needs to be versioned too (for ino_t). Pointed out by Izumi Tsutsui
|
1.7 |
| 01-Mar-2006 |
yamt | branches: 1.7.2; 1.7.4; 1.7.6; merge yamt-uio_vmspace branch.
- use vmspace rather than proc or lwp where appropriate. the latter is more natural to specify an address space. (and less likely to be abused for random purposes.) - fix a swdmover race.
|
1.6 |
| 11-Dec-2005 |
christos | branches: 1.6.2; 1.6.4; 1.6.6; merge ktrace-lwp.
|
1.5 |
| 13-Sep-2005 |
christos | branches: 1.5.6; compat code reorg.
|
1.4 |
| 19-Aug-2005 |
yamt | compat_30_sys_getdents: netbsd 1.2 -> 3.0 in comments/messages.
|
1.3 |
| 19-Aug-2005 |
yamt | compat_30_sys_getdents: don't leak kernel stack garbage to userland.
|
1.2 |
| 19-Aug-2005 |
christos | change a hard-coded 0xf to _DIRENT_ALIGN (thanks yamt)
|
1.1 |
| 19-Aug-2005 |
christos | 64 bit inode changes.
|
1.5.6.2 |
| 10-Nov-2005 |
skrll | Sync with HEAD. Here we go again...
|
1.5.6.1 |
| 13-Sep-2005 |
skrll | file vfs_syscalls_30.c was added on branch ktrace-lwp on 2005-11-10 14:00:40 +0000
|
1.6.6.2 |
| 01-Jun-2006 |
kardel | Sync with head.
|
1.6.6.1 |
| 22-Apr-2006 |
simonb | Sync with head.
|
1.6.4.1 |
| 09-Sep-2006 |
rpaulo | sync with head
|
1.6.2.1 |
| 31-Dec-2005 |
yamt | adapt some random parts of kernel to uio_vmspace.
|
1.7.6.1 |
| 24-May-2006 |
tron | Merge 2006-05-24 NetBSD-current into the "peter-altq" branch.
|
1.7.4.2 |
| 12-May-2006 |
elad | adapt to kauth kpi, include sys/kauth.h where needed..
|
1.7.4.1 |
| 11-May-2006 |
elad | sync with head
|
1.7.2.2 |
| 11-Aug-2006 |
yamt | sync with head
|
1.7.2.1 |
| 24-May-2006 |
yamt | sync with head.
|
1.9.6.7 |
| 24-Mar-2008 |
yamt | sync with head.
|
1.9.6.6 |
| 21-Jan-2008 |
yamt | sync with head
|
1.9.6.5 |
| 03-Sep-2007 |
yamt | sync with head.
|
1.9.6.4 |
| 26-Feb-2007 |
yamt | sync with head.
|
1.9.6.3 |
| 30-Dec-2006 |
yamt | sync with head.
|
1.9.6.2 |
| 21-Jun-2006 |
yamt | sync with head.
|
1.9.6.1 |
| 14-May-2006 |
yamt | file vfs_syscalls_30.c was added on branch yamt-lazymbuf on 2006-06-21 14:58:32 +0000
|
1.9.4.1 |
| 13-Jul-2006 |
gdamore | Merge from HEAD.
|
1.15.6.2 |
| 10-Dec-2006 |
yamt | sync with head.
|
1.15.6.1 |
| 22-Oct-2006 |
yamt | sync with head
|
1.15.4.2 |
| 30-Jan-2007 |
ad | Remove support for SA. Ok core@.
|
1.15.4.1 |
| 18-Nov-2006 |
ad | Sync with head.
|
1.18.2.1 |
| 12-Jun-2010 |
riz | Pull up following revision(s) (requested by he in ticket #1387): sys/compat/svr4/svr4_misc.c: revision 1.149 sys/compat/linux/common/linux_misc.c: revision 1.214 sys/compat/common/vfs_syscalls_30.c: revision 1.31 sys/compat/sunos/sunos_misc.c: revision 1.166 sys/compat/linux/common/linux_file64.c: revision 1.50 sys/compat/svr4_32/svr4_32_misc.c: revision 1.68 sys/compat/ibcs2/ibcs2_misc.c: revision 1.110 sys/compat/linux32/common/linux32_dirent.c: revision 1.10 sys/compat/sunos32/sunos32_misc.c: revision 1.69 sys/compat/irix/irix_dirent.c: revision 1.24 sys/compat/osf1/osf1_file.c: revision 1.38 When implementing "read directory", when there are too many empty entries in a row, and we need to try to read the next block, and have passed a non-NULL cookie pointer to VOP_READDIR, ensure that we free the cookie buffer before re-doing VOP_READDIR, so that we don't leak memory. This fix is similar to nfs_serv.c revisions 1.115 + 1.124. This should fix the long-standing problem observed by e.g. using Linux- emulated programs to take backup of servers, which is one of the problems which were reported in PR#42661. Thanks to pooka@ for the hints for traversing the VOP* layer.
|
1.19.2.2 |
| 07-May-2007 |
yamt | sync with head.
|
1.19.2.1 |
| 12-Mar-2007 |
rmind | Sync with HEAD.
|
1.21.4.1 |
| 11-Jul-2007 |
mjf | Sync with head.
|
1.21.2.1 |
| 27-May-2007 |
ad | Sync with head.
|
1.23.16.1 |
| 26-Dec-2007 |
ad | Sync with head.
|
1.23.8.1 |
| 09-Jan-2008 |
matt | sync with HEAD
|
1.23.6.1 |
| 09-Dec-2007 |
jmcneill | Sync with HEAD.
|
1.24.4.1 |
| 02-Jan-2008 |
bouyer | Sync with HEAD
|
1.25.6.4 |
| 17-Jan-2009 |
mjf | Sync with HEAD.
|
1.25.6.3 |
| 29-Jun-2008 |
mjf | Sync with HEAD.
|
1.25.6.2 |
| 02-Jun-2008 |
mjf | Sync with HEAD.
|
1.25.6.1 |
| 03-Apr-2008 |
mjf | Sync with HEAD.
|
1.26.6.4 |
| 11-Aug-2010 |
yamt | sync with head.
|
1.26.6.3 |
| 11-Mar-2010 |
yamt | sync with head
|
1.26.6.2 |
| 04-May-2009 |
yamt | sync with head.
|
1.26.6.1 |
| 16-May-2008 |
yamt | sync with head.
|
1.26.4.1 |
| 18-May-2008 |
yamt | sync with head.
|
1.26.2.3 |
| 09-Nov-2008 |
christos | fix fhstat.
|
1.26.2.2 |
| 01-Nov-2008 |
christos | Sync with head.
|
1.26.2.1 |
| 29-Mar-2008 |
christos | Welcome to the time_t=long long dev_t=uint64_t branch.
|
1.27.4.1 |
| 27-Jun-2008 |
simonb | Sync with head.
|
1.27.2.3 |
| 18-Sep-2008 |
wrstuden | Sync with wrstuden-revivesa-base-2.
|
1.27.2.2 |
| 14-May-2008 |
wrstuden | Per discussion with ad, remove most of the #include <sys/sa.h> lines as they were including sa.h just for the type(s) needed for syscallargs.h.
Instead, create a new file, sys/satypes.h, which contains just the types needed for syscallargs.h. Yes, there's only one now, but that may change and it's probably more likely to change if it'd be difficult to handle. :-)
Per discussion with matt at n dot o, add an include of satypes.h to sigtypes.h. Upcall handlers are kinda signal handlers, and signalling is the header file that's already included for syscallargs.h that closest matches SA.
This shaves about 3000 lines off of the diff of the branch relative to the base. That also represents about 18% of the total before this checkin.
I think this reduction is very good thing.
|
1.27.2.1 |
| 10-May-2008 |
wrstuden | Initial checkin of re-adding SA. Everything except kern_sa.c compiles in GENERIC for i386. This is still a work-in-progress, but this checkin covers most of the mechanical work (changing signalling to be able to accomidate SA's process-wide signalling and re-adding includes of sys/sa.h and savar.h). Subsequent changes will be much more interesting.
Also, kern_sa.c has received partial cleanup. There's still more to do, though.
|
1.28.12.1 |
| 21-Apr-2010 |
matt | sync to netbsd-5
|
1.28.6.1 |
| 17-Mar-2010 |
snj | Pull up following revision(s) (requested by he in ticket #1323): sys/compat/common/vfs_syscalls_30.c: revision 1.31 sys/compat/ibcs2/ibcs2_misc.c: revision 1.110 sys/compat/irix/irix_dirent.c: revision 1.24 sys/compat/linux/common/linux_file64.c: revision 1.50 sys/compat/linux/common/linux_misc.c: revision 1.214 sys/compat/linux32/common/linux32_dirent.c: revision 1.10 sys/compat/sunos/sunos_misc.c: revision 1.166 sys/compat/sunos32/sunos32_misc.c: revision 1.69 sys/compat/svr4/svr4_misc.c: revision 1.149 sys/compat/svr4_32/svr4_32_misc.c: revision 1.68 When implementing "read directory", when there are too many empty entries in a row, and we need to try to read the next block, and have passed a non-NULL cookie pointer to VOP_READDIR, ensure that we free the cookie buffer before re-doing VOP_READDIR, so that we don't leak memory. This fix is similar to nfs_serv.c revisions 1.115 + 1.124. This should fix the long-standing problem observed by e.g. using Linux- emulated programs to take backup of servers, which is one of the problems which were reported in PR#42661. Thanks to pooka@ for the hints for traversing the VOP* layer.
|
1.28.4.2 |
| 03-Mar-2009 |
skrll | Sync with HEAD.
|
1.28.4.1 |
| 19-Jan-2009 |
skrll | Sync with HEAD.
|
1.30.4.2 |
| 17-Aug-2010 |
uebayasi | Sync with HEAD.
|
1.30.4.1 |
| 30-Apr-2010 |
uebayasi | Sync with HEAD.
|
1.31.2.2 |
| 05-Mar-2011 |
rmind | sync with head
|
1.31.2.1 |
| 03-Jul-2010 |
rmind | sync with head
|
1.33.34.1 |
| 29-Dec-2014 |
martin | Pull up following revision(s) (requested by maxv in ticket #353): sys/ufs/chfs/chfs_vfsops.c: revision 1.12 sys/compat/common/vfs_syscalls_30.c: revision 1.35 sys/compat/linux/common/linux_uselib.c: revision 1.31 sys/compat/linux/common/linux_uselib.c: revision 1.32 Resource leak. Memory leaks. Reject non-regular files.
|
1.33.18.1 |
| 03-Dec-2017 |
jdolecek | update from HEAD
|
1.36.20.3 |
| 13-Apr-2020 |
martin | Mostly merge changes from HEAD upto 20200411
|
1.36.20.2 |
| 08-Apr-2020 |
martin | Merge changes from current as of 20200406
|
1.36.20.1 |
| 10-Jun-2019 |
christos | Sync with HEAD
|
1.36.18.3 |
| 22-Sep-2018 |
pgoyette | #include "opt_compat_netbsd.h" for all sources that provide compat code.
|
1.36.18.2 |
| 06-Sep-2018 |
pgoyette | Sync with HEAD
Resolve a couple of conflicts (result of the uimin/uimax changes)
|
1.36.18.1 |
| 28-Mar-2018 |
pgoyette | Initial pass at a compat_30 module.
Still needs some work for dev/vnd and various dev/usb/*
|
1.36.12.2 |
| 21-Jun-2023 |
martin | Pull up following revision(s) (requested by riastradh in ticket #1836):
sys/compat/linux/arch/i386/linux_machdep.c: revision 1.168 sys/compat/sunos/sunos_misc.c: revision 1.177 sys/compat/netbsd32/netbsd32_compat_50.c: revision 1.52 sys/compat/common/kern_resource_43.c: revision 1.23 sys/compat/netbsd32/netbsd32_conv.h: revision 1.46 sys/compat/linux/arch/i386/linux_ptrace.c: revision 1.35 sys/compat/common/vfs_syscalls_12.c: revision 1.38 sys/compat/ultrix/ultrix_misc.c: revision 1.126 sys/compat/common/kern_sig_43.c: revision 1.37 sys/compat/linux/common/linux_mtio.c: revision 1.8 sys/compat/freebsd/freebsd_misc.c: revision 1.34 sys/compat/linux/common/linux_olduname.c: revision 1.67 sys/compat/linux/arch/mips/linux_machdep.c: revision 1.44 sys/compat/freebsd/freebsd_sched.c: revision 1.23 sys/compat/ossaudio/ossaudio.c: revision 1.84 sys/compat/sys/time_types.h: revision 1.6 sys/compat/linux/arch/powerpc/linux_machdep.c: revision 1.51 sys/compat/linux/common/linux_file.c: revision 1.119 sys/compat/linux/arch/arm/linux_machdep.c: revision 1.34 sys/compat/netbsd32/netbsd32_wait.c: revision 1.25 sys/compat/linux32/common/linux32_time.c: revision 1.38 sys/compat/linux/arch/powerpc/linux_ptrace.c: revision 1.33 sys/compat/linux/arch/alpha/linux_machdep.c: revision 1.52 sys/compat/linux32/arch/amd64/linux32_machdep.c: revision 1.46 sys/compat/netbsd32/netbsd32_compat_12.c: revision 1.36 sys/compat/ultrix/ultrix_ioctl.c: revision 1.39 sys/compat/linux/common/linux_misc.c: revision 1.252 sys/compat/linux/common/linux_hdio.c: revision 1.19 sys/compat/sunos/sunos_ioctl.c: revision 1.71 sys/compat/linux/common/linux_sched.c: revision 1.79 sys/compat/common/kern_info_43.c: revision 1.40 sys/compat/linux32/common/linux32_exec_elf32.c: revision 1.20 sys/compat/linux/common/linux_socket.c: revision 1.153 sys/compat/linux/arch/amd64/linux_machdep.c: revision 1.60 sys/compat/common/vfs_syscalls_43.c: revision 1.68 sys/compat/linux/arch/powerpc/linux_exec_powerpc.c: revision 1.25 sys/compat/netbsd32/netbsd32_ptrace.c: revision 1.9 sys/compat/common/kern_time_50.c: revision 1.37 sys/compat/netbsd32/netbsd32_compat_20.c: revision 1.42 sys/compat/linux/common/linux_cdrom.c: revision 1.28 sys/compat/linux/arch/m68k/linux_machdep.c: revision 1.43 sys/compat/common/kern_info_09.c: revision 1.22 sys/compat/linux32/common/linux32_resource.c: revision 1.12 sys/compat/linux/common/linux_oldolduname.c: revision 1.67 sys/compat/netbsd32/netbsd32_nfssvc.c: revision 1.8 sys/compat/linux32/common/linux32_signal.c: revision 1.21 sys/compat/common/kern_sig_13.c: revision 1.22 sys/compat/sunos32/sunos32_ioctl.c: revision 1.36 sys/compat/netbsd32/netbsd32_compat_43.c: revision 1.62 sys/compat/linux/arch/arm/linux_ptrace.c: revision 1.23 sys/compat/netbsd32/netbsd32_time.c: revision 1.56 sys/compat/linux/common/linux_signal.c: revision 1.84 sys/compat/netbsd32/netbsd32_signal.c: revision 1.52 sys/compat/sunos32/sunos32_misc.c: revision 1.85 sys/compat/linux/common/linux_time.c: revision 1.40 sys/compat/linux/common/linux_fdio.c: revision 1.14 sys/compat/common/vfs_syscalls_30.c: revision 1.43
sys/compat: Memset zero before copyout.
Just in case of uninitialized padding which would lead to kernel stack disclosure. If the compiler can prove the memset redundant then it can optimize it away; otherwise better safe than sorry.
|
1.36.12.1 |
| 15-Aug-2021 |
martin | Pull up following revision(s) (requested by christos in ticket #1691):
sys/compat/common/vfs_syscalls_43.c: revision 1.67 sys/compat/common/vfs_syscalls_50.c: revision 1.26 sys/compat/common/vfs_syscalls_30.c: revision 1.42
- memset struct stat to avoid kernel memory disclosure of padded fields (thanks Trend Micro for the report) - use do_fhstat - consistency in argument order of compat functions
|
1.38.4.2 |
| 03-Aug-2022 |
martin | Pull up following revision(s), all via patch (requested by riastradh in ticket #1487):
sys/compat/linux/arch/i386/linux_machdep.c: revision 1.168 sys/compat/sunos/sunos_misc.c: revision 1.177 sys/compat/netbsd32/netbsd32_compat_50.c: revision 1.52 sys/compat/common/kern_resource_43.c: revision 1.23 sys/compat/netbsd32/netbsd32_conv.h: revision 1.46 sys/compat/linux/arch/i386/linux_ptrace.c: revision 1.35 sys/compat/common/vfs_syscalls_12.c: revision 1.38 sys/compat/ultrix/ultrix_misc.c: revision 1.126 sys/compat/common/kern_sig_43.c: revision 1.37 sys/compat/linux/common/linux_mtio.c: revision 1.8 sys/compat/freebsd/freebsd_misc.c: revision 1.34 sys/compat/freebsd/freebsd_machdep.c: revision 1.5 sys/compat/linux/common/linux_olduname.c: revision 1.67 sys/compat/linux/arch/mips/linux_machdep.c: revision 1.44 sys/compat/freebsd/freebsd_sched.c: revision 1.23 sys/compat/ossaudio/ossaudio.c: revision 1.84 sys/compat/sys/time_types.h: revision 1.6 sys/compat/linux/arch/powerpc/linux_machdep.c: revision 1.51 sys/compat/common/ieee80211_20.c: revision 1.7 sys/compat/linux/common/linux_file.c: revision 1.119 sys/compat/linux/arch/arm/linux_machdep.c: revision 1.34 sys/compat/netbsd32/netbsd32_wait.c: revision 1.25 sys/compat/linux32/common/linux32_time.c: revision 1.38 sys/compat/linux/arch/powerpc/linux_ptrace.c: revision 1.33 sys/compat/linux/arch/alpha/linux_machdep.c: revision 1.52 sys/compat/linux32/arch/amd64/linux32_machdep.c: revision 1.46 sys/compat/netbsd32/netbsd32_compat_12.c: revision 1.36 sys/compat/ultrix/ultrix_ioctl.c: revision 1.39 sys/compat/linux/common/linux_misc.c: revision 1.252 sys/compat/linux/common/linux_hdio.c: revision 1.19 sys/compat/sunos/sunos_ioctl.c: revision 1.71 sys/compat/linux/common/linux_sched.c: revision 1.79 sys/compat/common/kern_info_43.c: revision 1.40 sys/compat/linux32/common/linux32_exec_elf32.c: revision 1.20 sys/compat/linux/common/linux_socket.c: revision 1.153 sys/compat/linux/arch/amd64/linux_machdep.c: revision 1.60 sys/compat/common/vfs_syscalls_43.c: revision 1.68 sys/compat/linux/arch/powerpc/linux_exec_powerpc.c: revision 1.25 sys/compat/netbsd32/netbsd32_ptrace.c: revision 1.9 sys/compat/common/kern_time_50.c: revision 1.37 sys/compat/netbsd32/netbsd32_compat_20.c: revision 1.42 sys/compat/linux/common/linux_cdrom.c: revision 1.28 sys/compat/linux/arch/m68k/linux_machdep.c: revision 1.43 sys/compat/common/kern_info_09.c: revision 1.22 sys/compat/linux32/common/linux32_resource.c: revision 1.12 sys/compat/linux/common/linux_oldolduname.c: revision 1.67 sys/compat/common/if_media_80.c: revision 1.4 sys/compat/linux/arch/alpha/linux_osf1.c: revision 1.5 sys/compat/netbsd32/netbsd32_nfssvc.c: revision 1.8 sys/compat/linux32/common/linux32_signal.c: revision 1.21 sys/compat/common/kern_sig_13.c: revision 1.22 sys/compat/sunos32/sunos32_ioctl.c: revision 1.36 sys/compat/netbsd32/netbsd32_compat_43.c: revision 1.62 sys/compat/linux/arch/arm/linux_ptrace.c: revision 1.23 sys/compat/netbsd32/netbsd32_time.c: revision 1.56 sys/compat/linux/common/linux_signal.c: revision 1.84 sys/compat/netbsd32/netbsd32_signal.c: revision 1.52 sys/compat/sunos32/sunos32_misc.c: revision 1.85 sys/compat/linux/common/linux_time.c: revision 1.40 sys/compat/linux/common/linux_fdio.c: revision 1.14 sys/compat/common/vfs_syscalls_30.c: revision 1.43
sys/compat: Memset zero before copyout.
Just in case of uninitialized padding which would lead to kernel stack disclosure. If the compiler can prove the memset redundant then it can optimize it away; otherwise better safe than sorry.
|
1.38.4.1 |
| 15-Aug-2021 |
martin | Pull up following revision(s) (requested by christos in ticket #1337):
sys/compat/common/vfs_syscalls_43.c: revision 1.67 sys/compat/common/vfs_syscalls_50.c: revision 1.26 sys/compat/common/vfs_syscalls_30.c: revision 1.42
- memset struct stat to avoid kernel memory disclosure of padded fields (thanks Trend Micro for the report) - use do_fhstat - consistency in argument order of compat functions
|
1.39.2.2 |
| 29-Feb-2020 |
ad | Sync with head.
|
1.39.2.1 |
| 17-Jan-2020 |
ad | Sync with head.
|