linux-stable/net
Kees Cook 03f61041c1 skbuff: Switch structure bounds to struct_group()
In preparation for FORTIFY_SOURCE performing compile-time and run-time
field bounds checking for memcpy(), memmove(), and memset(), avoid
intentionally writing across neighboring fields.

Replace the existing empty member position markers "headers_start" and
"headers_end" with a struct_group(). This will allow memcpy() and sizeof()
to more easily reason about sizes, and improve readability.

"pahole" shows no size nor member offset changes to struct sk_buff.
"objdump -d" shows no object code changes (outside of WARNs affected by
source line number changes).

Signed-off-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Gustavo A. R. Silva <gustavoars@kernel.org>
Reviewed-by: Jason A. Donenfeld <Jason@zx2c4.com> # drivers/net/wireguard/*
Link: https://lore.kernel.org/lkml/20210728035006.GD35706@embeddedor
Signed-off-by: David S. Miller <davem@davemloft.net>
2021-11-22 15:13:54 +00:00
..
6lowpan
9p 9p: fix a bunch of checkpatch warnings 2021-11-04 21:04:25 +09:00
802 net: 802: Use memset_startat() to clear struct fields 2021-11-19 11:23:23 +00:00
8021q net: annotate accesses to dev->gso_max_segs 2021-11-22 12:49:42 +00:00
appletalk
atm net: atm: use address setting helpers 2021-10-24 13:59:45 +01:00
ax25
batman-adv Merge branch 'exit-cleanups-for-v5.16' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2021-11-10 16:15:54 -08:00
bluetooth bluetooth-next pull request for net-next: 2021-11-17 14:52:44 +00:00
bpf bpf: Add dummy BPF STRUCT_OPS for test purpose 2021-11-01 14:10:00 -07:00
bpfilter
bridge net: annotate accesses to dev->gso_max_segs 2021-11-22 12:49:42 +00:00
caif net: caif: get ready for const netdev->dev_addr 2021-10-24 13:59:45 +01:00
can can: j1939: j1939_tp_cmd_recv(): check the dst address of TP.CM_BAM 2021-11-06 17:29:32 +01:00
ceph libceph, ceph: move ceph_osdc_copy_from() into cephfs code 2021-11-08 03:29:52 +01:00
core skbuff: Switch structure bounds to struct_group() 2021-11-22 15:13:54 +00:00
dcb
dccp net: dccp: Use memset_startat() for TP zeroing 2021-11-19 11:22:49 +00:00
decnet
dns_resolver
dsa net: dsa: felix: fix broken VLAN-tagged PTP under VLAN-aware bridge 2021-11-03 14:22:00 +00:00
ethernet
ethtool ethtool: extend ringparam setting/getting API with rx_buf_len 2021-11-22 12:31:49 +00:00
hsr net: hsr: Add support for redbox supervision frames 2021-10-26 14:52:17 +01:00
ieee802154 net: drop nopreempt requirement on sock_prot_inuse_add() 2021-11-16 13:20:45 +00:00
ife
ipv4 arp: Remove #ifdef CONFIG_PROC_FS 2021-11-22 14:34:07 +00:00
ipv6 ipv6: Use memset_after() to zero rt6_info 2021-11-19 11:51:26 +00:00
iucv net/af_iucv: Use struct_group() to zero struct iucv_sock region 2021-11-19 11:52:25 +00:00
kcm
key
l2tp
l3mdev
lapb
llc llc/snap: constify dev_addr passing 2021-10-13 09:40:46 -07:00
mac80211 ethtool: extend ringparam setting/getting API with rx_buf_len 2021-11-22 12:31:49 +00:00
mac802154 mac802154: use dev_addr_set() - manual 2021-10-20 14:27:40 +01:00
mctp mctp/test: Update refcount checking in route fragment tests 2021-11-18 12:01:14 +00:00
mpls
mptcp mptcp: sockopt: add SOL_IP freebind & transparent options 2021-11-20 14:11:00 +00:00
ncsi
netfilter net: align static siphash keys 2021-11-16 19:07:54 -08:00
netlabel
netlink net: drop nopreempt requirement on sock_prot_inuse_add() 2021-11-16 13:20:45 +00:00
netrom
nfc NFC: add NCI_UNREG flag to eliminate the race 2021-11-17 20:17:05 -08:00
nsh
openvswitch include/linux/mm.h: move nr_free_buffer_pages from swap.h to mm.h 2021-11-06 13:30:43 -07:00
packet net: drop nopreempt requirement on sock_prot_inuse_add() 2021-11-16 13:20:45 +00:00
phonet
psample
qrtr
rds rds: Fix a typo in a comment 2021-11-22 14:28:37 +00:00
rfkill
rose rose: constify dev_addr passing 2021-10-13 09:40:45 -07:00
rxrpc
sched Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-11-18 13:13:16 -08:00
sctp net: annotate accesses to dev->gso_max_size 2021-11-22 12:49:42 +00:00
smc Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-11-18 13:13:16 -08:00
strparser bpf: sockmap, strparser, and tls are reusing qdisc_skb_cb and colliding 2021-11-09 01:05:28 +01:00
sunrpc A slow cycle for nfsd: mainly cleanup, including Neil's patch dropping 2021-11-10 16:45:54 -08:00
switchdev net: switchdev: merge switchdev_handle_fdb_{add,del}_to_device 2021-10-27 14:54:02 +01:00
tipc tipc: check for null after calling kmemdup 2021-11-17 20:04:52 -08:00
tls Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-10-28 10:43:58 -07:00
unix net: drop nopreempt requirement on sock_prot_inuse_add() 2021-11-16 13:20:45 +00:00
vmw_vsock vsock: prevent unnecessary refcnt inc for nonblocking connect 2021-11-10 14:36:11 +00:00
wireless nl80211: fix radio statistics in survey dump 2021-11-15 10:51:51 +01:00
x25
xdp Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-11-18 13:13:16 -08:00
xfrm Core: 2021-11-02 06:20:58 -07:00
compat.c
devres.c
Kconfig net: kunit: add a test for dev_addr_lists 2021-11-20 12:25:57 +00:00
Makefile
socket.c
sysctl_net.c sections: move and rename core_kernel_data() to is_kernel_core_data() 2021-11-09 10:02:50 -08:00