android_kernel_motorola_sm6375/net
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Bui Quang Minh 693158f765 UPSTREAM: bpf: Fix integer overflow in argument calculation for bpf_map_area_alloc
commit 7dd5d437c258bbf4cc15b35229e5208b87b8b4e0 upstream.

In 32-bit architecture, the result of sizeof() is a 32-bit integer so
the expression becomes the multiplication between 2 32-bit integer which
can potentially leads to integer overflow. As a result,
bpf_map_area_alloc() allocates less memory than needed.

Fix this by casting 1 operand to u64.

Fixes: 0d2c4f964050 ("bpf: Eliminate rlimit-based memory accounting for sockmap and sockhash maps")
Fixes: 99c51064fb06 ("devmap: Use bpf_map_area_alloc() for allocating hash buckets")
Fixes: 546ac1ffb7 ("bpf: add devmap, a map for storing net device references")
Signed-off-by: Bui Quang Minh <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]
Signed-off-by: Connor O'Brien <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
Change-Id: I9ce1991224a87eb39acf1da4923534e22380fc42
2022-01-25 13:40:43 +00:00
..
6lowpan 6lowpan: iphc: Fix an off-by-one check of array index 2021-09-15 09:47:31 +02:00
9p 9p/net: fix missing error check in p9_check_errors 2021-11-17 09:48:49 +01:00
802
8021q net: vlan: fix a UAF in vlan_dev_real_dev() 2021-11-17 09:48:47 +01:00
appletalk
atm
ax25
batman-adv net: batman-adv: fix error handling 2021-11-02 19:46:14 +01:00
bluetooth Bluetooth: fix init and cleanup of sco_conn.timeout_work 2021-11-17 09:48:33 +01:00
bpf
bpfilter
bridge net: bridge: use nla_total_size_64bit() in br_get_linkxstats_size() 2021-10-13 10:08:19 +02:00
caif This is the 5.4.148 stable release 2021-09-25 14:41:58 +02:00
can This is the 5.4.160 stable release 2021-11-17 10:19:21 +01:00
ceph
core UPSTREAM: bpf: Fix integer overflow in argument calculation for bpf_map_area_alloc 2022-01-25 13:40:43 +00:00
dcb
dccp dccp: don't duplicate ccid when cloning dccp sock 2021-09-22 12:26:40 +02:00
decnet
dns_resolver
dsa net: dsa: destroy the phylink instance on any error in dsa_slave_phy_setup 2021-09-22 12:26:42 +02:00
ethernet
hsr
ieee802154
ife
ipv4 This is the 5.4.160 stable release 2021-11-17 10:19:21 +01:00
ipv6 This is the 5.4.160 stable release 2021-11-17 10:19:21 +01:00
iucv
kcm
key
l2tp net/l2tp: Fix reference count leak in l2tp_udp_recv_core 2021-09-22 12:26:41 +02:00
l3mdev
lapb
llc
mac80211 This is the 5.4.154 stable release 2021-10-17 10:56:22 +02:00
mac802154
mpls
ncsi
netfilter This is the 5.4.160 stable release 2021-11-17 10:19:21 +01:00
netlabel net: fix NULL pointer reference in cipso_v4_doi_free 2021-09-22 12:26:36 +02:00
netlink netlink: annotate data races around nlk->bound 2021-10-13 10:08:19 +02:00
netrom
nfc nfc: nci: fix the UAF of rf_conn_info object 2021-10-27 09:54:28 +02:00
nsh
openvswitch
packet
phonet
psample
qrtr
rds
rfkill
rose
rxrpc rxrpc: Fix _usecs_to_jiffies() by using usecs_to_jiffies() 2021-11-17 09:48:34 +01:00
sched Revert "net: sched: update default qdisc visibility after Tx queue cnt changes" 2021-11-19 13:42:39 +01:00
sctp This is the 5.4.157 stable release 2021-11-02 20:04:52 +01:00
smc net/smc: fix sk_refcnt underflow on linkdown and fallback 2021-11-17 09:48:48 +01:00
strparser bpf: sockmap, strparser, and tls are reusing qdisc_skb_cb and colliding 2021-11-17 09:48:48 +01:00
sunrpc SUNRPC: Partial revert of commit 6f9f17287e78 2021-11-17 09:48:50 +01:00
switchdev net: switchdev: do not propagate bridge updates across bridges 2021-10-27 09:54:24 +02:00
tipc tipc: increase timeout in tipc_sk_enqueue() 2021-09-22 12:26:41 +02:00
tls net/tls: Fix flipped sign in async_wait.err assignment 2021-11-02 19:46:14 +01:00
unix af_unix: fix races in sk_peer_pid and sk_peer_cred accesses 2021-10-06 15:42:35 +02:00
vmw_vsock This is the 5.4.160 stable release 2021-11-17 10:19:21 +01:00
wimax
wireless This is the 5.4.157 stable release 2021-11-02 20:04:52 +01:00
x25
xdp
xfrm UPSTREAM: net: xfrm: fix memory leak in xfrm_user_rcv_msg 2022-01-24 11:41:01 -08:00
compat.c
Kconfig
Makefile
OWNERS
socket.c This is the 5.4.144 stable release 2021-09-03 10:17:46 +02:00
sysctl_net.c