lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Mon, 18 Nov 2013 23:14:17 +0100
From:	Hannes Frederic Sowa <hannes@...essinduktion.org>
To:	David Miller <davem@...emloft.net>
Cc:	eric.dumazet@...il.com, mpb.mail@...il.com, netdev@...r.kernel.org
Subject: Re: [PATCH v4] inet: prevent leakage of uninitialized memory to user in recv syscalls

On Mon, Nov 18, 2013 at 08:13:50AM -0800, Eric Dumazet wrote:
> This definitely looks much better, as this will remove lot of crap,
> thanks !
> 
> unix_dgram_recvmsg() and unix_stream_recvmsg() for example clear
> msg_namelen

Most recvfrom calls are fine, but there is appletalk, tun and even macvtap
and a lot other recvmsg calls I still have to check.

On Mon, Nov 18, 2013 at 03:14:30PM -0500, David Miller wrote:
> This looks a lot better than your previous attempts, nice work.
> 
> Applied and queued up for -stable.
> 
> The handling of msg_name/msg_namelen in the ->recvmsg proto op is decidedly
> non-trivial.  Can I suggest that we at least add some documentation about
> this semantic above "(*recvmsg)" in the definition of proto_ops in
> include/linux/net.h?

Thanks!

I even want to come up with a better scheme for that. I do think we
can pass msg_namelen == 0 initially and let the recvmsg handlers update
it. So we have a safe fallback. The possible uninitialized memory leaks
can be pretty big, so I would like to see new recvmsg callers not return
anything if they don't care about msg_namelen. This should get noticed
during testing.

I'll add documentation in future patches.

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ