linux/net
Willem de Bruijn b245be1f4d net-timestamp: no-payload only sysctl
Tx timestamps are looped onto the error queue on top of an skb. This
mechanism leaks packet headers to processes unless the no-payload
options SOF_TIMESTAMPING_OPT_TSONLY is set.

Add a sysctl that optionally drops looped timestamp with data. This
only affects processes without CAP_NET_RAW.

The policy is checked when timestamps are generated in the stack.
It is possible for timestamps with data to be reported after the
sysctl is set, if these were queued internally earlier.

No vulnerability is immediately known that exploits knowledge
gleaned from packet headers, but it may still be preferable to allow
administrators to lock down this path at the cost of possible
breakage of legacy applications.

Signed-off-by: Willem de Bruijn <willemb@google.com>

----

Changes
  (v1 -> v2)
  - test socket CAP_NET_RAW instead of capable(CAP_NET_RAW)
  (rfc -> v1)
  - document the sysctl in Documentation/sysctl/net.txt
  - fix access control race: read .._OPT_TSONLY only once,
        use same value for permission check and skb generation.
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-02-02 18:46:51 -08:00
..
6lowpan
9p
802
8021q vlan: advertise link netns via netlink 2015-01-23 17:51:15 -08:00
appletalk
atm
ax25
batman-adv batman-adv: Kconfig, Add missing DEBUG_FS dependency 2015-01-07 22:17:11 +01:00
bluetooth Bluetooth: Remove unused function 2015-01-16 13:06:38 +02:00
bridge bridge: offload bridge port attributes to switch asic if feature flag set 2015-02-01 23:16:34 -08:00
caif
can netlink: make nlmsg_end() and genlmsg_end() void 2015-01-18 01:03:45 -05:00
ceph libceph: fix sparse endianness warnings 2015-01-08 20:36:57 +03:00
core net-timestamp: no-payload only sysctl 2015-02-02 18:46:51 -08:00
dcb
dccp
decnet netlink: Fix bugs in nlmsg_end() conversions. 2015-01-18 23:36:08 -05:00
dns_resolver
dsa net: dsa: set slave MII bus PHY mask 2015-01-25 16:00:54 -08:00
ethernet
hsr
ieee802154 netlink: make nlmsg_end() and genlmsg_end() void 2015-01-18 01:03:45 -05:00
ipv4 net-timestamp: no-payload option 2015-02-02 18:46:51 -08:00
ipv6 net-timestamp: no-payload option 2015-02-02 18:46:51 -08:00
ipx
irda irda: use msecs_to_jiffies for conversions 2015-01-30 18:08:25 -08:00
iucv
key
l2tp netlink: make nlmsg_end() and genlmsg_end() void 2015-01-18 01:03:45 -05:00
lapb
llc net: llc: use correct size for sysctl timeout entries 2015-01-25 00:23:21 -08:00
mac80211 Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-01-27 16:59:56 -08:00
mac802154 mac802154: fix kbuild test robot warning 2015-01-03 01:51:51 +01:00
mpls net: mark some potential candidates __read_mostly 2015-01-30 17:58:39 -08:00
netfilter netlink: make nlmsg_end() and genlmsg_end() void 2015-01-18 01:03:45 -05:00
netlabel netlink: make nlmsg_end() and genlmsg_end() void 2015-01-18 01:03:45 -05:00
netlink net: remove sock_iocb 2015-01-28 23:15:07 -08:00
netrom
nfc NFC: hci: Remove nfc_hci_pipe2gate function 2015-01-28 00:03:36 +01:00
openvswitch openvswitch: Add support for checksums on UDP tunnels. 2015-01-28 23:04:15 -08:00
packet netlink: make nlmsg_end() and genlmsg_end() void 2015-01-18 01:03:45 -05:00
phonet phonet netlink: allow multiple messages per skb in route dump 2015-01-19 16:20:17 -05:00
rds
rfkill
rose
rxrpc net-timestamp: no-payload option 2015-02-02 18:46:51 -08:00
sched pkt_sched: fq: remove useless TIME_WAIT check 2015-01-28 23:23:57 -08:00
sctp net: sctp: fix slab corruption from use after free on INIT collisions 2015-01-26 17:02:05 -08:00
sunrpc rpc: fix xdr_truncate_encode to handle buffer ending on page boundary 2015-01-07 14:03:58 -05:00
switchdev swdevice: add new apis to set and del bridge port attributes 2015-02-01 23:16:34 -08:00
tipc tipc: fix excessive network event logging 2015-01-26 16:58:08 -08:00
unix net: remove sock_iocb 2015-01-28 23:15:07 -08:00
vmw_vsock
wimax
wireless Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2015-01-27 16:59:56 -08:00
x25
xfrm netlink: make nlmsg_end() and genlmsg_end() void 2015-01-18 01:03:45 -05:00
Kconfig
Makefile
compat.c
socket.c net: remove sock_iocb 2015-01-28 23:15:07 -08:00
sysctl_net.c