freebsd-dev/sys
Brooks Davis 855acb84ca Fix bugs in plugable CC algorithm and siftr sysctls.
Use the sysctl_handle_int() handler to write out the old value and read
the new value into a temporary variable. Use the temporary variable
for any checks of values rather than using the CAST_PTR_INT() macro on
req->newptr. The prior usage read directly from userspace memory if the
sysctl() was called correctly. This is unsafe and doesn't work at all on
some architectures (at least i386.)

In some cases, the code could also be tricked into reading from kernel
memory and leaking limited information about the contents or crashing
the system. This was true for CDG, newreno, and siftr on all platforms
and true for i386 in all cases. The impact of this bug is largest in
VIMAGE jails which have been configured to allow writing to these
sysctls.

Per discussion with the security officer, we will not be issuing an
advisory for this issue as root access and a non-default config are
required to be impacted.

Reviewed by:	markj, bz
Discussed with:	gordon (security officer)
MFC after:	3 days
Security:	kernel information leak, local DoS (both require root)
Differential Revision:	https://reviews.freebsd.org/D18443
2018-12-15 15:06:22 +00:00
..
amd64 amd64: stop re-reading curpc on subyte/suword 2018-12-08 04:53:08 +00:00
arm [mv_pci] Do not attempt to attach disabled PCI ports 2018-12-15 02:35:48 +00:00
arm64 mv_thermal: Add thermal driver for AP806 and CP110 thermal sensor 2018-12-12 22:33:05 +00:00
bsm
cam nda(4) fix check for Dataset Management support 2018-12-13 13:25:37 +00:00
cddl dtrace: fix userspace access on boxes with SMAP 2018-12-13 20:09:38 +00:00
compat Remove unused argument to priv_check_cred. 2018-12-11 19:32:16 +00:00
conf powerpcspe: Don't require FPU_EMU for powerpcspe IEEE emulation 2018-12-15 04:53:02 +00:00
contrib Revert accidentally included changes in r342108 2018-12-15 05:47:22 +00:00
crypto Generalize AES iov optimization 2018-12-13 04:40:53 +00:00
ddb ddb: Enable 'thread <address>' 2018-10-20 20:45:49 +00:00
dev Add new USB id in rtwn_usb(4) (RTL8812AU) 2018-12-15 14:58:45 +00:00
dts arm64: allwinner: Fix pwm dtso 2018-12-12 21:10:34 +00:00
fs Remove unused argument to priv_check_cred. 2018-12-11 19:32:16 +00:00
gdb
geom gmirror: Remove a last-minute INVARIANTS breakage in r341840 2018-12-12 18:13:56 +00:00
gnu Update our devicetree to 4.19 for arm and arm64 2018-11-10 21:02:32 +00:00
i386 Merge ^/head r340918 through r341763. 2018-12-09 11:39:45 +00:00
isa Reapply, with minor tweaks, r338025, from the original commit: 2018-09-26 17:12:14 +00:00
kern vfs: mostly depessimize NDINIT_ALL 2018-12-14 03:55:08 +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 atomic_cmpset return value is also an int. 2018-12-14 19:48:42 +00:00
modules arm64: allwinner: Add DTSO for pwm and r_pwm 2018-12-12 21:02:22 +00:00
net Remove unused argument to priv_check_cred. 2018-12-11 19:32:16 +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 Fix bugs in plugable CC algorithm and siftr sysctls. 2018-12-15 15:06:22 +00:00
netinet6 Remove unused argument to priv_check_cred. 2018-12-11 19:32:16 +00:00
netipsec Remove unused argument to priv_check_cred. 2018-12-11 19:32:16 +00:00
netpfil pf: Fix endless loop on NAT exhaustion with sticky-address 2018-12-12 20:15:06 +00:00
netsmb Remove unused argument to priv_check_cred. 2018-12-11 19:32:16 +00:00
nfs Switch RIB and RADIX_NODE_HEAD lock from rwlock(9) to rmlock(9). 2018-06-16 08:26:23 +00:00
nfsclient
nfsserver
nlm
ofed ipoib: Notify on modify QP failure only when relevant 2018-12-05 13:27:17 +00:00
opencrypto Plug memory leak for AES_*_NIST_GMAC algorithms. 2018-12-13 08:59:51 +00:00
powerpc powerpc/booke: Change KERNBASE to be physical load address 2018-12-13 05:07:39 +00:00
riscv Add some more checking to the RISC-V page fault handler. 2018-12-14 21:07:12 +00:00
rpc Add kern.rpc.gss.client_max, to make it possible to bump it easily. 2018-12-15 11:32:11 +00:00
security Remove unused argument to priv_check_cred. 2018-12-11 19:32:16 +00:00
sparc64 Plug memory disclosures via ptrace(2). 2018-12-03 20:54:17 +00:00
sys efirt: When present, attempt to use EFI runtime services to shutdown 2018-12-15 05:46:04 +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 make_dtb.sh: Use $CPP instead of assuming that cpp is in $PATH 2018-12-14 23:53:28 +00:00
ufs Continuing efforts to provide hardening of FFS. This change adds a 2018-12-11 22:14:37 +00:00
vm Remove unused argument to priv_check_cred. 2018-12-11 19:32:16 +00:00
x86 Fix the PAE kernel gcc build. 2018-12-11 16:49:01 +00:00
xdr
xen xen: legacy PVH fixes for the new interrupt count 2018-09-13 07:14:11 +00:00
Makefile