[Bug 214488] mqueuefs mq_setattr() leaks stack memory
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Sun Nov 13 22:22:51 UTC 2016
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=214488
Bug ID: 214488
Summary: mqueuefs mq_setattr() leaks stack memory
Product: Base System
Version: CURRENT
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: kern
Assignee: freebsd-bugs at FreeBSD.org
Reporter: vlad902+spam at gmail.com
CC: freebsd-security at FreeBSD.org
Created attachment 176971
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=176971&action=edit
Example trigger
In kern/uipc_mqueue.c, sys_kmq_setattr() calls kern_kmq_setattr() to fill out a
struct mq_attr before copying it back to userland; however, kern_kmq_setattr()
does not zero the struct or clear the __reserved field, leaking 4 words worth
of uninitialized stack memory. The same goes for freebsd32_kmq_setattr except
it's mq_attr_to32() that does not clear __reserved in struct mq_attr32.
The mqueuefs kernel module needs to be loaded to reach this code. Example code
is attached to dump leaked memory.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the freebsd-security
mailing list