freebsd-dev/sys
Andrey V. Elsukov a716ad4a35 Fix possible panic during ifnet detach in rtsock.
The panic can happen, when some application does dump of routing table
using sysctl interface. To prevent this, set IFF_DYING flag in
if_detach_internal() function, when ifnet under lock is removed from
the chain. In sysctl_rtsock() take IFNET_RLOCK_NOSLEEP() to prevent
ifnet detach during routes enumeration. In case, if some interface was
detached in the time before we take the lock, add the check, that ifnet
is not DYING. This prevents access to memory that could be freed after
ifnet is unlinked.

PR:		227720, 230498, 233306
Reviewed by:	bz, eugen
MFC after:	1 week
Sponsored by:	Yandex LLC
Differential Revision:	https://reviews.freebsd.org/D18338
2018-11-27 09:04:06 +00:00
..
amd64 Remove superfluous bzero in getcontext/swapcontext/sendsig 2018-11-26 20:56:05 +00:00
arm Prevent kernel stack disclosure in signal delivery 2018-11-26 20:52:53 +00:00
arm64 Prevent kernel stack disclosure in signal delivery 2018-11-26 20:52:53 +00:00
bsm
cam NVME trim clocking 2018-11-27 00:36:35 +00:00
cddl Ensure that directory entry padding bytes are zeroed. 2018-11-23 22:24:59 +00:00
compat Pass malloc flags directly through kevent(2) subroutines. 2018-11-24 17:06:01 +00:00
conf Add dependency to allow if_muge device to be only ethernet device in stripped-down RPI3 kernel. 2018-11-26 22:45:58 +00:00
contrib Combine two lines into one following unifdef for r255332. 2018-11-24 18:23:05 +00:00
crypto rijndael (AES): Avoid leaking sensitive data on kernel stack 2018-10-26 20:53:01 +00:00
ddb ddb: Enable 'thread <address>' 2018-10-20 20:45:49 +00:00
dev Check for an allocation failure before dereferencing the pointer. 2018-11-26 22:42:52 +00:00
dts Fix test-dts{,o} targets 2018-11-12 22:18:11 +00:00
fs Ensure the dirent remains initialized when dirent.d_fileno is unset. 2018-11-23 23:07:49 +00:00
gdb
geom Revert r340187, it breaks EOD (end-of-device) detection logic. Turns out, 2018-11-07 16:28:09 +00:00
gnu Update our devicetree to 4.19 for arm and arm64 2018-11-10 21:02:32 +00:00
i386 Remove superfluous bzero in getcontext/swapcontext/sendsig 2018-11-26 20:56:05 +00:00
isa Reapply, with minor tweaks, r338025, from the original commit: 2018-09-26 17:12:14 +00:00
kern Remove superfluous bzero in getcontext/swapcontext/sendsig 2018-11-26 20:56:05 +00:00
kgssapi OpenCrypto: Convert sessions to opaque handles instead of integers 2018-07-18 00:56:25 +00:00
libkern mcount: tidy up ANSIfication 2018-10-20 22:39:35 +00:00
mips Prevent kernel stack disclosure in getcontext/swapcontext 2018-11-26 20:50:55 +00:00
modules sfxge(4): update autogenerated headers from firmwaresrc 2018-11-26 07:23:02 +00:00
net Fix possible panic during ifnet detach in rtsock. 2018-11-27 09:04:06 +00:00
net80211 Fix misspellings of transmitter/transmitted 2018-08-10 20:37:32 +00:00
netgraph ng_source(4): correction after the change r340617 2018-11-27 04:05:38 +00:00
netinet Plug some networking sysctl leaks. 2018-11-22 20:49:41 +00:00
netinet6 Plug some networking sysctl leaks. 2018-11-22 20:49:41 +00:00
netipsec Add sadb_x_sa2 extension to SADB_ACQUIRE requests. 2018-10-21 14:19:16 +00:00
netpfil Add ability to use dynamic external prefix in ipfw_nptv6 module. 2018-11-12 11:20:59 +00:00
netsmb Make timespecadd(3) and friends public 2018-07-30 15:46:40 +00:00
nfs
nfsclient
nfsserver
nlm
ofed Plug some networking sysctl leaks. 2018-11-22 20:49:41 +00:00
opencrypto Add sha224 to the authctx union. 2018-10-23 18:07:37 +00:00
powerpc Prevent kernel stack disclosure in getcontext/swapcontext 2018-11-26 20:50:55 +00:00
riscv Prevent kernel stack disclosure in signal delivery 2018-11-26 20:52:53 +00:00
rpc Set SO_SNDTIMEO in the client side krpc when CLSET_TIMEOUT is done. 2018-07-20 12:03:16 +00:00
security Add const to input-only char * arguments. 2018-11-02 20:50:22 +00:00
sparc64 Given that the idea of D15374 was to "make memmove a first class citizen", 2018-11-20 00:08:33 +00:00
sys Pass malloc flags directly through kevent(2) subroutines. 2018-11-24 17:06:01 +00:00
teken Implement ECMA-48 "REP", some Linuxen have started emitting them recently. 2018-10-21 08:29:36 +00:00
tests epoch_test: fix compile 2018-07-15 00:31:17 +00:00
tools Use ${ECHO} in dtb/dtbo build, pass in from dtb.mk for -s 2018-11-09 18:56:40 +00:00
ufs Move the check for the filesystem having been run on a kernel that 2018-11-26 00:58:07 +00:00
vm Avoid unneeded check in vmspace_alloc(). 2018-11-25 17:56:49 +00:00
x86 Add definitions for Intel Speed Shift 2018-11-21 00:21:58 +00:00
xdr
xen xen: legacy PVH fixes for the new interrupt count 2018-09-13 07:14:11 +00:00
Makefile