Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

More netbsd32 emulation ktrace overrides

0 views
Skip to first unread message

Martin Husemann

unread,
Sep 9, 2016, 4:54:50 AM9/9/16
to tech...@netbsd.org
As mentioned in the other thread here, I am trying to make ktrace output
working for netbsd32 emulated ktrace/kdump.

The patch below allows emulations to override the "msghdr" ktrace data
output by various variants of sendmsg/recvmsg. This is simmply done by
passing two new args to do_sys_sendmsg()/do_sys_recvmsg() and friends
which provide alternative data to record in the ktrace record.

Since a full msgheader is not always conveniently available, it is also
possible to pass a NULL pointer and ~0U as size to skip this ktrace
record completely.

If passing NULL/0 as the new args, the native msghdr is output, which means
most callers simply needed adding "NULL, 0," in the argument list.

A few compat versions are missing here, but will be added before commit.

Any objections?

Martin
ktr_recvsend.patch

William J. Coldwell

unread,
Sep 9, 2016, 5:04:59 AM9/9/16
to Martin Husemann, tech...@netbsd.org
Are these overflows a security issue?
Like giving up valid kernel memory.

--
Cryo:William J. Coldwell ARIN:WC25/AS7769 PGP:0xF97CC215/0x5E9944455
Warped, Inc. warped.com Founder/CTO 661-WARPED1 @warped @deadjournal
NetBSD netbsd.org/pkgsrc.org President,Project Security,Social Media
"Put on 3D glasses, otherwise you only see in 1½D.” [self opinion];
> <ktr_recvsend.patch>

Martin Husemann

unread,
Sep 9, 2016, 5:06:59 AM9/9/16
to William J. Coldwell, tech...@netbsd.org
On Fri, Sep 09, 2016 at 04:00:56AM -0500, William J. Coldwell wrote:
> Are these overflows a security issue?
> Like giving up valid kernel memory.

No security issue. They just record the 64bit version of the msghdr
structure (which has just been passed in from userland anyway) instead
of the 32bit one, and the decoder in kdump can not handle that.

Martin

William J. Coldwell

unread,
Sep 9, 2016, 5:10:48 AM9/9/16
to Martin Husemann, tech...@netbsd.org
Thank you for clarifying.


--
Cryo:William J. Coldwell ARIN:WC25/AS7769 PGP:0xF97CC215/0x5E9944455
Warped, Inc. warped.com Founder/CTO 661-WARPED1 @warped @deadjournal
NetBSD netbsd.org/pkgsrc.org President,Project Security,Social Media
"Put on 3D glasses, otherwise you only see in 1½D.” [self opinion];

0 new messages