diff options
author | Ani Sinha <ani@arista.com> | 2014-09-08 14:49:59 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-09-09 17:35:46 -0700 |
commit | 6a2a2b3ae0759843b22c929881cc184b00cc63ff (patch) | |
tree | a66ecb7bbf576550a3865badf290d6015507d5ce /net/rxrpc | |
parent | 4748997ec7572bd86dddbe36ed056aff9f3a7c1d (diff) | |
download | linux-6a2a2b3ae0759843b22c929881cc184b00cc63ff.tar.gz linux-6a2a2b3ae0759843b22c929881cc184b00cc63ff.tar.bz2 linux-6a2a2b3ae0759843b22c929881cc184b00cc63ff.zip |
net:socket: set msg_namelen to 0 if msg_name is passed as NULL in msghdr struct from userland.
Linux manpage for recvmsg and sendmsg calls does not explicitly mention setting msg_namelen to 0 when
msg_name passed set as NULL. When developers don't set msg_namelen member in msghdr, it might contain garbage
value which will fail the validation check and sendmsg and recvmsg calls from kernel will return EINVAL. This will
break old binaries and any code for which there is no access to source code.
To fix this, we set msg_namelen to 0 when msg_name is passed as NULL from userland.
Signed-off-by: Ani Sinha <ani@arista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rxrpc')
0 files changed, 0 insertions, 0 deletions