diff options
author | Neal Cardwell <ncardwell@google.com> | 2012-12-08 23:43:21 +0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2012-12-10 03:59:37 +0400 |
commit | 1c95df85ca49640576de2f0a850925957b547b84 (patch) | |
tree | f39f7537be01cf536c4f125e0f3671dc83ddc04b /mm/kmemcheck.c | |
parent | ed23ec4f0a510528e0ffe415f9394107418ae854 (diff) | |
download | linux-1c95df85ca49640576de2f0a850925957b547b84.tar.xz |
inet_diag: fix oops for IPv4 AF_INET6 TCP SYN-RECV state
Fix inet_diag to be aware of the fact that AF_INET6 TCP connections
instantiated for IPv4 traffic and in the SYN-RECV state were actually
created with inet_reqsk_alloc(), instead of inet6_reqsk_alloc(). This
means that for such connections inet6_rsk(req) returns a pointer to a
random spot in memory up to roughly 64KB beyond the end of the
request_sock.
With this bug, for a server using AF_INET6 TCP sockets and serving
IPv4 traffic, an inet_diag user like `ss state SYN-RECV` would lead to
inet_diag_fill_req() causing an oops or the export to user space of 16
bytes of kernel memory as a garbage IPv6 address, depending on where
the garbage inet6_rsk(req) pointed.
Signed-off-by: Neal Cardwell <ncardwell@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'mm/kmemcheck.c')
0 files changed, 0 insertions, 0 deletions