HomeFreeBSD

ipfilter: Plug ip_htable kernel information leak

Description

ipfilter: Plug ip_htable kernel information leak

ipf_htable_stats_get() constructs an iphtstat_t on the stack and only
initializes select fields before copying the entire structure to
userland. The trailing padding array iphs_pad[16] is never initialized,
so ~128 bytes of uninitialized kernel stack memory can be leaked to user
space on each call. This is a classic information disclosure
vulnerability that can reveal pointers and other sensitive data.

We fix this by zeroing out the data structure prior to use.

Reported by: Ilja Van Sprundel <ivansprundel@ioactive.com>
Reviewed by: emaste
Differential revision: https://reviews.freebsd.org/D53275

(cherry picked from commit 0d589ecbc7aa916537fd21c0344919491cfcb293)

Details

Provenance
cyAuthored on Wed, Oct 22, 4:29 PM
Reviewer
emaste
Differential Revision
D53275: ipfilter: Plug ip_htable kernel information leak
Parents
rG8a4e4d10f91e: kdb: Fix a typo in a source code comment
Branches
Unknown
Tags
Unknown