Skip to content

Fix leaking of kernel heap addresses in net/

Dan Rosenberg netdev 1 version NAK

Status from this message: NACK

Get series with b4
b4 am 1289147492.3090.137.camel@Dan

Versions newest first

  1. v1 Latest9 patches 9 repliesNAK

Patches in v1

#Subject and filesSizeRepliesApplied
1/9Fix leaking of kernel heap addresses in net/net/atm/proc.c+1 -10 replies
2/9Fix leaking of kernel heap addresses in net/net/caif/caif_socket.c+2 -10 replies
3/9Fix leaking of kernel heap addresses in net/net/ipv4/af_inet.c net/ipv4/raw.c net/ipv4/tcp_ipv4.c +1 more+14 -131 reply
4/9Fix leaking of kernel heap addresses in net/net/ipv6/raw.c net/ipv6/tcp_ipv6.c net/ipv6/udp.c+10 -100 replies
5/9Fix leaking of kernel heap addresses in net/net/key/af_key.c+4 -30 replies
6/9Fix leaking of kernel heap addresses in net/net/netlink/af_netlink.c+6 -40 replies
7/9Fix leaking of kernel heap addresses in net/net/packet/af_packet.c+4 -30 replies
8/9Fix leaking of kernel heap addresses in net/net/rxrpc/af_rxrpc.c+2 -10 replies
9/9Fix leaking of kernel heap addresses in net/net/unix/af_unix.c+4 -30 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/9] Fix leaking of kernel heap addresses in net/

This patch series resolves the leakage of kernel heap addresses to userspace via network protocol /proc interfaces and public error messages. Revealing this information is a bad idea from a security perspective for a number of reasons, the most obvious of which is it provides unprivileged users a mechanism by which to create a structure in the kernel heap containing function pointers, obtain the address of that structure, and overwrite those function pointers by leveraging other vulnerabilities. It is my hope that by eliminating this information leakage, in conjunction with making statically-declared function pointer tables read-only (to be done in a separate patch series), we can at least add a small hurdle for the exploitation of a subset of kernel vulnerabilities.

To maintain compatibility with userspace programs relying on consistent /proc output, the output descriptions and number of fields are not changed. When a unique identifier for the socket is desired, the socket address has been replaced with the socket inode number. When the inode number is already present in the output, the address has been replaced with a 0. In these cases, the format specifier has been changed to %d, because a %p output of 0 from kernel space is written as "(null)", while userspace %p can only parse "(nil)".

-Dan