aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv6/addrconf.c
diff options
context:
space:
mode:
authorDavid Ahern <dsahern@gmail.com>2018-10-07 20:16:25 -0700
committerDavid S. Miller <davem@davemloft.net>2018-10-08 10:39:04 -0700
commita5f6cba291654168e6ab73c3e7ff5b27371c4cb9 (patch)
treea3f42feae3abbe665fecebe9d5350c86ce6572fd /net/ipv6/addrconf.c
parentnet: Add extack to nlmsg_parse (diff)
downloadlinux-dev-a5f6cba291654168e6ab73c3e7ff5b27371c4cb9.tar.xz
linux-dev-a5f6cba291654168e6ab73c3e7ff5b27371c4cb9.zip
netlink: Add strict version of nlmsg_parse and nla_parse
nla_parse is currently lenient on message parsing, allowing type to be 0 or greater than max expected and only logging a message "netlink: %d bytes leftover after parsing attributes in process `%s'." if the netlink message has unknown data at the end after parsing. What this could mean is that the header at the front of the attributes is actually wrong and the parsing is shifted from what is expected. Add a new strict version that actually fails with EINVAL if there are any bytes remaining after the parsing loop completes, if the atttrbitue type is 0 or greater than max expected. Signed-off-by: David Ahern <dsahern@gmail.com> Acked-by: Christian Brauner <christian@brauner.io> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
0 files changed, 0 insertions, 0 deletions