freebsd-dev/sys
Mark Johnston 4013d72684 Fix handling of empty SCM_RIGHTS messages.
As unp_internalize() processes the input control messages, it builds
an output mbuf chain containing the internalized representations of
those messages.  In one special case, that of an empty SCM_RIGHTS
message, the message is simply discarded.  However, the loop which
appends mbufs to the output chain assumed that each iteration would
produce an mbuf, resulting in a null pointer dereference if an empty
SCM_RIGHTS message was followed by a non-empty message.

Fix this by advancing the output mbuf chain tail pointer only if an
internalized control message was produced.

Reported by:	syzbot+1b5cced0f7fad26ae382@syzkaller.appspotmail.com
MFC after:	1 week
Sponsored by:	The FreeBSD Foundation
2019-10-08 23:34:48 +00:00
..
amd64 amd64: plug spurious cld instructions 2019-10-08 21:14:11 +00:00
arm align use of cp15_pmccntr_get with its availability 2019-10-07 07:37:42 +00:00
arm64 Eliminate an unused declaration. The variable in question is only defined 2019-10-07 04:22:03 +00:00
bsm
cam Add kern.cam.da.X.quirks tunable, similar existing for ada. 2019-09-26 14:48:39 +00:00
cddl zfs: use atomic_load_64 to read atomic variable in dmu_object_alloc_impl 2019-10-08 11:27:48 +00:00
compat Define macro VM_MAP_ENTRY_FOREACH for enumerating the entries in a vm_map. 2019-10-08 07:14:21 +00:00
conf Introduce stats(3), a flexible statistics gathering API. 2019-10-07 19:05:05 +00:00
contrib Widen NET_EPOCH coverage. 2019-10-07 22:40:05 +00:00
crypto
ddb ddb(4): Add some support for lexing IPv6 addresses 2019-09-09 16:32:23 +00:00
dev Add support for KTLS in the Chelsio TOE module. 2019-10-08 21:40:42 +00:00
dts
fs Define macro VM_MAP_ENTRY_FOREACH for enumerating the entries in a vm_map. 2019-10-08 07:14:21 +00:00
gdb gdb(4): Root a sysctl tree at 'debug.gdb.' 2019-09-08 22:52:47 +00:00
geom Add a "count_until_fail" option to gnop, which says to start failing 2019-09-13 23:03:56 +00:00
gnu arm: dts: ti: Fix mmc3 instance by setting it to disabled 2019-10-07 08:11:49 +00:00
i386 i386: hide more of atomic 64-bit definitions under _KERNEL 2019-10-08 10:50:16 +00:00
isa
kern Fix handling of empty SCM_RIGHTS messages. 2019-10-08 23:34:48 +00:00
kgssapi
libkern
mips add atomic_load_64 for mipsn32 2019-10-07 07:42:26 +00:00
modules nvdimm(4): Fix Clang build after r353110 2019-10-04 21:47:09 +00:00
net Remove epoch assertion from if_setlladdr(). Originally this function was 2019-10-08 17:55:45 +00:00
net80211
netgraph Widen NET_EPOCH coverage. 2019-10-07 22:40:05 +00:00
netinet Add a TOE KTLS mode and a TOE hook for allocating TLS sessions. 2019-10-08 21:34:06 +00:00
netinet6 Improve locking in the IPV6_V6ONLY socket option handler. 2019-10-07 23:35:23 +00:00
netipsec Widen NET_EPOCH coverage. 2019-10-07 22:40:05 +00:00
netpfil Widen NET_EPOCH coverage. 2019-10-07 22:40:05 +00:00
netsmb
nfs
nfsclient
nfsserver
nlm
ofed Widen NET_EPOCH coverage. 2019-10-07 22:40:05 +00:00
opencrypto kTLS support for TLS 1.3 2019-09-27 19:17:40 +00:00
powerpc powerpc: Implement atomic_(f)cmpset_ for short and char 2019-10-08 01:36:34 +00:00
riscv Avoid erroneously clearing PGA_WRITEABLE in riscv's pmap_enter(). 2019-10-08 15:03:48 +00:00
rpc
security Define macro VM_MAP_ENTRY_FOREACH for enumerating the entries in a vm_map. 2019-10-08 07:14:21 +00:00
sparc64 sparc64: use generic sub-word atomic *cmpset 2019-10-02 17:08:20 +00:00
sys Add a TOE KTLS mode and a TOE hook for allocating TLS sessions. 2019-10-08 21:34:06 +00:00
teken
tests
tools fw_stub.awk: use @generated tag in generated files 2019-09-11 13:35:22 +00:00
ufs ufs: add root vnode caching 2019-10-06 22:18:03 +00:00
vm Define macro VM_MAP_ENTRY_FOREACH for enumerating the entries in a vm_map. 2019-10-08 07:14:21 +00:00
x86 amd64: plug spurious cld instructions 2019-10-08 21:14:11 +00:00
xdr
xen
Makefile