aboutsummaryrefslogtreecommitdiff
path: root/sys/netinet/ip_divert.c
diff options
context:
space:
mode:
authorMark Johnston <markj@FreeBSD.org>2018-11-22 20:49:41 +0000
committerMark Johnston <markj@FreeBSD.org>2018-11-22 20:49:41 +0000
commit79db6fe7aa5e7bb735eb1566f55edce75615c720 (patch)
tree2626d0322d4e98de7450cdeeacf42a2b9cf3d8c6 /sys/netinet/ip_divert.c
parentad2be389414d64b79144d637a843d96757b90b26 (diff)
downloadsrc-79db6fe7aa5e7bb735eb1566f55edce75615c720.tar.gz
src-79db6fe7aa5e7bb735eb1566f55edce75615c720.zip
Plug some networking sysctl leaks.
Various network protocol sysctl handlers were not zero-filling their output buffers and thus would export uninitialized stack memory to userland. Fix a number of such handlers. Reported by: Thomas Barabosch, Fraunhofer FKIE Reviewed by: tuexen MFC after: 3 days Security: kernel memory disclosure Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D18301
Notes
Notes: svn path=/head/; revision=340783
Diffstat (limited to 'sys/netinet/ip_divert.c')
-rw-r--r--sys/netinet/ip_divert.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/netinet/ip_divert.c b/sys/netinet/ip_divert.c
index e96c8135e5da..96c1664b795e 100644
--- a/sys/netinet/ip_divert.c
+++ b/sys/netinet/ip_divert.c
@@ -664,6 +664,7 @@ div_pcblist(SYSCTL_HANDLER_ARGS)
if (error != 0)
return (error);
+ bzero(&xig, sizeof(xig));
xig.xig_len = sizeof xig;
xig.xig_count = n;
xig.xig_gen = gencnt;