CVS commit: src/sys/netsmb

2020-01-06 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Tue Jan  7 06:14:43 UTC 2020

Modified Files:
src/sys/netsmb: smb_smb.c

Log Message:
Set 'ntencpass' to NULL as part of 'again', to prevent use-after-free.


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/netsmb/smb_smb.c

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



CVS commit: src/sys/netsmb

2019-04-15 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Apr 15 21:00:33 UTC 2019

Modified Files:
src/sys/netsmb: smb_conn.c

Log Message:
Prevent a NULL pointer dereference when the local endpoint is not defined.
>From Andy Nguyen, many thanks.


To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/sys/netsmb/smb_conn.c

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



CVS commit: src/sys/netsmb

2017-10-03 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Oct  3 15:27:10 UTC 2017

Modified Files:
src/sys/netsmb: smb_subr.c

Log Message:
>From FreeBSD:

netsmb: Fix buggy/racy smb_strdupin()

smb_strdupin() tried to roll a copyin() based strlen to allocate a buffer
and then blindly copyin that size.  Of course, a malicious user program
could simultaneously manipulate the buffer, resulting in a non-terminated
string being copied.

Later assumptions in the code rely upon the string being nul-terminated.

Just use copyinstr() and drop the racy sizing.

PR: 222687
Reported by:Meng Xu 
Security:   possible local DoS
Sponsored by:   Dell EMC Isilon


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/netsmb/smb_subr.c

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



CVS commit: src/sys/netsmb

2017-07-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Jul 28 14:45:59 UTC 2017

Modified Files:
src/sys/netsmb: smb_dev.c

Log Message:
Reject negative offset/count for smb read/write.

Not clear that this is actually a problem for the kernel -- might
overwrite user's buffers or return garbage to user, but that's their
own damn fault.  But it's hard to imagine that negative offset/count
ever makes sense, and I haven't ruled out a problem for the kernel.


To generate a diff of this commit:
cvs rdiff -u -r1.49 -r1.50 src/sys/netsmb/smb_dev.c

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



CVS commit: src/sys/netsmb

2017-07-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Jul 28 14:40:42 UTC 2017

Modified Files:
src/sys/netsmb: smb_usr.c

Log Message:
Reject negative ioc_setupcnt.


To generate a diff of this commit:
cvs rdiff -u -r1.18 -r1.19 src/sys/netsmb/smb_usr.c

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



CVS commit: src/sys/netsmb

2017-07-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Jul 28 14:37:27 UTC 2017

Modified Files:
src/sys/netsmb: smb_subr.c smb_subr.h smb_usr.c

Log Message:
Plug another overflow: refuse bogus sa_len from user.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/netsmb/smb_subr.c
cvs rdiff -u -r1.21 -r1.22 src/sys/netsmb/smb_subr.h
cvs rdiff -u -r1.17 -r1.18 src/sys/netsmb/smb_usr.c

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



CVS commit: src/sys/netsmb

2017-07-28 Thread Taylor R Campbell
Module Name:src
Committed By:   riastradh
Date:   Fri Jul 28 14:20:46 UTC 2017

Modified Files:
src/sys/netsmb: smb_usr.c

Log Message:
Reject allocations for too-small buffers from userland.

>From Ilja Van Sprundel.


To generate a diff of this commit:
cvs rdiff -u -r1.16 -r1.17 src/sys/netsmb/smb_usr.c

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



CVS commit: src/sys/netsmb

2016-08-15 Thread Maxime Villard
Module Name:src
Committed By:   maxv
Date:   Mon Aug 15 08:17:35 UTC 2016

Modified Files:
src/sys/netsmb: smb_rq.c

Log Message:
Uninitialized vars, found by brainy


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/netsmb/smb_rq.c

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



CVS commit: src/sys/netsmb

2016-07-18 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Mon Jul 18 21:03:01 UTC 2016

Modified Files:
src/sys/netsmb: smb_dev.c

Log Message:
Rearrange so that error check is only done after error has been set.

CID 1364141


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/netsmb/smb_dev.c

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



CVS commit: src/sys/netsmb

2016-07-16 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Jul 17 02:48:07 UTC 2016

Modified Files:
src/sys/netsmb: smb_dev.c

Log Message:
Now that we're only calling devsw_attach() in the modular driver, it
is not ok for the driver/module to already exist.  So don't ignore
EEXIST.


To generate a diff of this commit:
cvs rdiff -u -r1.47 -r1.48 src/sys/netsmb/smb_dev.c

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



CVS commit: src/sys/netsmb

2016-07-16 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Jul 17 00:33:28 UTC 2016

Modified Files:
src/sys/netsmb: smb_dev.c

Log Message:
Ooops - previous change was over-zealous.  We still need the cdevsw for
the built-in case.  Restore it.


To generate a diff of this commit:
cvs rdiff -u -r1.46 -r1.47 src/sys/netsmb/smb_dev.c

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



CVS commit: src/sys/netsmb

2016-07-16 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Jul 17 00:27:03 UTC 2016

Modified Files:
src/sys/netsmb: smb_dev.c

Log Message:
Finish previous - now that we're not calling devsw_attach unnecessarily,
we can enclose some additional variables in #ifdef _MODULE / #endif


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/netsmb/smb_dev.c

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



CVS commit: src/sys/netsmb

2016-07-16 Thread Paul Goyette
Module Name:src
Committed By:   pgoyette
Date:   Sun Jul 17 00:17:14 UTC 2016

Modified Files:
src/sys/netsmb: smb_dev.c

Log Message:
Rather than calling devsw_attach() and ignoring the EEXIST error when
the driver is already built-in to the kernel, don't bother calling.


To generate a diff of this commit:
cvs rdiff -u -r1.44 -r1.45 src/sys/netsmb/smb_dev.c

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



CVS commit: src/sys/netsmb

2015-05-22 Thread Tyler R. Retzlaff
Module Name:src
Committed By:   rtr
Date:   Fri May 22 22:05:32 UTC 2015

Modified Files:
src/sys/netsmb: smb_trantcp.c

Log Message:
pass connect address directly to soconnect()

instead of allocating an mbuf, copying the address into it and then
mtod()'ing it back to a sockaddr * for soconnect.


To generate a diff of this commit:
cvs rdiff -u -r1.48 -r1.49 src/sys/netsmb/smb_trantcp.c

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



CVS commit: src/sys/netsmb

2014-04-25 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Apr 25 15:54:12 UTC 2014

Modified Files:
src/sys/netsmb: smb_trantcp.c

Log Message:
whoops, remove testing printf


To generate a diff of this commit:
cvs rdiff -u -r1.45 -r1.46 src/sys/netsmb/smb_trantcp.c

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



CVS commit: src/sys/netsmb

2014-02-20 Thread Joerg Sonnenberger
Module Name:src
Committed By:   joerg
Date:   Thu Feb 20 11:08:57 UTC 2014

Modified Files:
src/sys/netsmb: iconv.c

Log Message:
Don't dereference NULL pointers.


To generate a diff of this commit:
cvs rdiff -u -r1.12 -r1.13 src/sys/netsmb/iconv.c

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



CVS commit: src/sys/netsmb

2012-05-11 Thread Takeshi Nakayama
Module Name:src
Committed By:   nakayama
Date:   Sat May 12 01:40:37 UTC 2012

Modified Files:
src/sys/netsmb: subr_mchain.c

Log Message:
Tabify.


To generate a diff of this commit:
cvs rdiff -u -r1.21 -r1.22 src/sys/netsmb/subr_mchain.c

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



CVS commit: src/sys/netsmb

2012-05-11 Thread Takeshi Nakayama
Module Name:src
Committed By:   nakayama
Date:   Fri May 11 14:51:39 UTC 2012

Modified Files:
src/sys/netsmb: subr_mchain.c

Log Message:
Since "len" has changed to (unsinged) size_t, the while loop
condition (len > 0) became less able to detect its underflow.
So check the subtrahend to avoid the underflow.

Should fix PR kern/44092.


To generate a diff of this commit:
cvs rdiff -u -r1.20 -r1.21 src/sys/netsmb/subr_mchain.c

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



CVS commit: src/sys/netsmb

2011-09-26 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Tue Sep 27 01:16:35 UTC 2011

Modified Files:
src/sys/netsmb: smb.h

Log Message:
remove unused constant


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.18 src/sys/netsmb/smb.h

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



CVS commit: src/sys/netsmb

2011-09-25 Thread Chuck Silvers
Module Name:src
Committed By:   chs
Date:   Sun Sep 25 13:42:31 UTC 2011

Modified Files:
src/sys/netsmb: smb_subr.c

Log Message:
don't mix static and non-static MALLOC_DEFINE()s in the same file,
it fails to compile with gcc 4.5 on alpha.


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/netsmb/smb_subr.c

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



CVS commit: src/sys/netsmb

2010-12-17 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Dec 17 14:27:34 UTC 2010

Modified Files:
src/sys/netsmb: smb_dev.c

Log Message:
* remove #ifdef nonsense (which caused the lossage in the first place)
* make it a DRIVER so that it autoloads when /dev/nsmb is opened


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 src/sys/netsmb/smb_dev.c

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



CVS commit: src/sys/netsmb

2010-12-17 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Dec 17 13:24:45 UTC 2010

Modified Files:
src/sys/netsmb: smb_dev.c

Log Message:
Try to unbreak module a little.  It would be really nice to not
utterly break things in the name of modularization, especially if
avoiding breakage takes 2min.


To generate a diff of this commit:
cvs rdiff -u -r1.37 -r1.38 src/sys/netsmb/smb_dev.c

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



CVS commit: src/sys/netsmb

2010-12-17 Thread Antti Kantee
Module Name:src
Committed By:   pooka
Date:   Fri Dec 17 13:05:31 UTC 2010

Modified Files:
src/sys/netsmb: iconv.h smb_conn.c smb_conn.h smb_dev.c smb_iod.c
smb_rq.c smb_subr.h subr_mchain.c

Log Message:
unifdef -D__NetBSD__


To generate a diff of this commit:
cvs rdiff -u -r1.9 -r1.10 src/sys/netsmb/iconv.h
cvs rdiff -u -r1.26 -r1.27 src/sys/netsmb/smb_conn.c
cvs rdiff -u -r1.19 -r1.20 src/sys/netsmb/smb_conn.h \
src/sys/netsmb/smb_subr.h src/sys/netsmb/subr_mchain.c
cvs rdiff -u -r1.36 -r1.37 src/sys/netsmb/smb_dev.c
cvs rdiff -u -r1.38 -r1.39 src/sys/netsmb/smb_iod.c
cvs rdiff -u -r1.33 -r1.34 src/sys/netsmb/smb_rq.c

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



CVS commit: src/sys/netsmb

2010-12-15 Thread Adam Hoka
Module Name:src
Committed By:   ahoka
Date:   Wed Dec 15 12:58:13 UTC 2010

Modified Files:
src/sys/netsmb: smb_dev.c smb_iod.c

Log Message:
take two on module support
XXX this wont work as a builtin module


To generate a diff of this commit:
cvs rdiff -u -r1.35 -r1.36 src/sys/netsmb/smb_dev.c
cvs rdiff -u -r1.37 -r1.38 src/sys/netsmb/smb_iod.c

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



CVS commit: src/sys/netsmb

2010-12-10 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Sat Dec 11 04:21:17 UTC 2010

Modified Files:
src/sys/netsmb: smb_dev.c smb_iod.c

Log Message:
Back this out. Fails lockdebug with duplicate lock initialization.
Please test with LOCKDEBUG!


To generate a diff of this commit:
cvs rdiff -u -r1.34 -r1.35 src/sys/netsmb/smb_dev.c
cvs rdiff -u -r1.36 -r1.37 src/sys/netsmb/smb_iod.c

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



CVS commit: src/sys/netsmb

2010-12-10 Thread Adam Hoka
Module Name:src
Committed By:   ahoka
Date:   Fri Dec 10 19:44:18 UTC 2010

Modified Files:
src/sys/netsmb: smb_dev.c smb_iod.c

Log Message:
Module support for NetBSD


To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/netsmb/smb_dev.c
cvs rdiff -u -r1.35 -r1.36 src/sys/netsmb/smb_iod.c

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



CVS commit: src/sys/netsmb

2010-07-11 Thread Christos Zoulas
Module Name:src
Committed By:   christos
Date:   Mon Jul 12 02:58:01 UTC 2010

Modified Files:
src/sys/netsmb: mchain.h smb_dev.h smb_subr.c smb_subr.h subr_mchain.c

Log Message:
Convert sizes/lengths to unsigned (size_t) or uint32_t
(for binary compatibility).


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 src/sys/netsmb/mchain.h
cvs rdiff -u -r1.6 -r1.7 src/sys/netsmb/smb_dev.h
cvs rdiff -u -r1.34 -r1.35 src/sys/netsmb/smb_subr.c
cvs rdiff -u -r1.18 -r1.19 src/sys/netsmb/smb_subr.h \
src/sys/netsmb/subr_mchain.c

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