Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: [netbsd-10] src/sys/nfs



Module Name:    src
Committed By:   martin
Date:           Thu Mar 30 11:57:26 UTC 2023

Modified Files:
        src/sys/nfs [netbsd-10]: nfs_serv.c nfs_srvsubs.c nfsm_subs.h

Log Message:
Pull up following revision(s) (requested by riastradh in ticket #134):

        sys/nfs/nfs_serv.c: revision 1.184
        sys/nfs/nfs_srvsubs.c: revision 1.17
        sys/nfs/nfsm_subs.h: revision 1.56
        sys/nfs/nfsm_subs.h: revision 1.57

nfs: Use unsigned fhlen so we don't trip over negative values.

nfs: Avoid integer overflow in nfs_namei bounds check.

nfs: Use unsigned name lengths so we don't trip over negative ones.
- nfsm_strsiz is only used with uint32_t in callers, but let's not
  leave it as a rake to step on.
- nfsm_srvnamesiz is abused with signed s.  The internal conversion
  to unsigned serves to reject both negative and too-large values in
  such callers.
  XXX Should make all callers use unsigned, rather than flipping back
  and forth between signed and unsigned for name lengths.

nfs: Avoid free of uninitialized on bad name size in create, mknod.
XXX These error branches are a nightmare and need to be more
systematically cleaned up.  Even if they are correct now, they are
impossible to audit and extremely fragile in case anyone ever needs
to make other changes to them.


To generate a diff of this commit:
cvs rdiff -u -r1.183 -r1.183.4.1 src/sys/nfs/nfs_serv.c
cvs rdiff -u -r1.16 -r1.16.4.1 src/sys/nfs/nfs_srvsubs.c
cvs rdiff -u -r1.55 -r1.55.4.1 src/sys/nfs/nfsm_subs.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index