Date: Sun, 13 Nov 2016 22:22:50 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 214488] mqueuefs mq_setattr() leaks stack memory Message-ID: <bug-214488-8@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D214488 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@FreeBSD.org Reporter: vlad902+spam@gmail.com CC: freebsd-security@FreeBSD.org Created attachment 176971 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=3D176971&action= =3Dedit Example trigger In kern/uipc_mqueue.c, sys_kmq_setattr() calls kern_kmq_setattr() to fill o= ut a struct mq_attr before copying it back to userland; however, kern_kmq_setatt= r() does not zero the struct or clear the __reserved field, leaking 4 words wor= th of uninitialized stack memory. The same goes for freebsd32_kmq_setattr exce= pt 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 c= ode is attached to dump leaked memory. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-214488-8>