freebsd-dev/sys/netinet/cc
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
..
cc_cdg.c Fix bugs in plugable CC algorithm and siftr sysctls. 2018-12-15 15:06:22 +00:00
cc_chd.c Fix bugs in plugable CC algorithm and siftr sysctls. 2018-12-15 15:06:22 +00:00
cc_cubic.c NULL out cc_data in pluggable TCP {cc}_cb_destroy 2018-07-22 05:37:58 +00:00
cc_cubic.h cc_cubic: 2018-05-03 15:01:27 +00:00
cc_dctcp.c Fix bugs in plugable CC algorithm and siftr sysctls. 2018-12-15 15:06:22 +00:00
cc_hd.c Fix bugs in plugable CC algorithm and siftr sysctls. 2018-12-15 15:06:22 +00:00
cc_htcp.c Use the new VNET_DEFINE_STATIC macro when we are defining static VNET 2018-07-24 16:35:52 +00:00
cc_module.h sys: general adoption of SPDX licensing ID tags. 2017-11-27 15:23:17 +00:00
cc_newreno.c Fix bugs in plugable CC algorithm and siftr sysctls. 2018-12-15 15:06:22 +00:00
cc_newreno.h Add support for the experimental Internet-Draft "TCP Alternative Backoff with 2018-03-19 16:37:47 +00:00
cc_vegas.c Fix bugs in plugable CC algorithm and siftr sysctls. 2018-12-15 15:06:22 +00:00
cc.c Add support for the experimental Internet-Draft "TCP Alternative Backoff with 2018-03-19 16:37:47 +00:00
cc.h Limit option_len for the TCP_CCALGOOPT. 2018-11-30 10:50:07 +00:00