kernel_samsung_a53x/net
Xin Long 06433495b9 sctp: properly validate chunk size in sctp_sf_ootb()
[ Upstream commit 0ead60804b64f5bd6999eec88e503c6a1a242d41 ]

A size validation fix similar to that in Commit 50619dbf8db7 ("sctp: add
size validation when walking chunks") is also required in sctp_sf_ootb()
to address a crash reported by syzbot:

  BUG: KMSAN: uninit-value in sctp_sf_ootb+0x7f5/0xce0 net/sctp/sm_statefuns.c:3712
  sctp_sf_ootb+0x7f5/0xce0 net/sctp/sm_statefuns.c:3712
  sctp_do_sm+0x181/0x93d0 net/sctp/sm_sideeffect.c:1166
  sctp_endpoint_bh_rcv+0xc38/0xf90 net/sctp/endpointola.c:407
  sctp_inq_push+0x2ef/0x380 net/sctp/inqueue.c:88
  sctp_rcv+0x3831/0x3b20 net/sctp/input.c:243
  sctp4_rcv+0x42/0x50 net/sctp/protocol.c:1159
  ip_protocol_deliver_rcu+0xb51/0x13d0 net/ipv4/ip_input.c:205
  ip_local_deliver_finish+0x336/0x500 net/ipv4/ip_input.c:233

Reported-by: syzbot+f0cbb34d39392f2746ca@syzkaller.appspotmail.com
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Link: https://patch.msgid.link/a29ebb6d8b9f8affd0f9abb296faafafe10c17d8.1730223981.git.lucien.xin@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-11-30 02:33:22 +01:00
..
6lowpan
9p
802
8021q Revert "gro: remove rcu_read_lock/rcu_read_unlock from gro_receive handlers" 2024-11-24 00:23:41 +01:00
appletalk
atm
ax25 Make more sysctl constants read-only 2024-11-30 02:15:48 +01:00
batman-adv batman-adv: fix random jitter calculation 2024-11-19 17:55:48 +01:00
bluetooth Revert "Bluetooth: bnep: Fix out-of-bound access" 2024-11-24 00:23:52 +01:00
bpf
bpfilter
bridge Revert "net: bridge: br_fdb_external_learn_add(): always set EXT_LEARN" 2024-11-24 00:23:41 +01:00
caif
can Revert "can: bcm: Remove proc entry when dev is unregistered." 2024-11-24 00:23:42 +01:00
ceph libceph: fix race between delayed_work() and ceph_monc_stop() 2024-11-19 14:19:45 +01:00
core Make more sysctl constants read-only 2024-11-30 02:15:48 +01:00
dcb
dccp
decnet
dns_resolver
dsa
ethernet Revert "gro: remove rcu_read_lock/rcu_read_unlock from gro_receive handlers" 2024-11-24 00:23:41 +01:00
ethtool Revert "ethtool: check device is present when getting link settings" 2024-11-24 00:23:49 +01:00
hsr
ieee802154
ife
ipv4 add back Android paranoid check for socket creation 2024-11-30 02:17:31 +01:00
ipv6 add back Android paranoid check for socket creation 2024-11-30 02:17:31 +01:00
iucv Revert "net/iucv: fix use after free in iucv_sock_close()" 2024-11-24 00:23:55 +01:00
kcm kcm: Serialise kcm_sendmsg() for the same socket. 2024-11-23 23:20:48 +01:00
key
l2tp genetlink: hold RCU in genlmsg_mcast() 2024-11-23 23:21:59 +01:00
l3mdev net: Add l3mdev index to flow struct and avoid oif reset for port devices 2024-11-23 23:21:52 +01:00
lapb
llc
mac80211 Revert "wifi: mac80211: fix BA session teardown race" 2024-11-24 00:23:53 +01:00
mac802154 Revert "net: mac802154: Fix racy device stats updates by DEV_STATS_INC() and DEV_STATS_ADD()" 2024-11-19 14:52:14 +01:00
mpls
mptcp Revert "mptcp: correct MPTCP_SUBFLOW_ATTR_SSN_OFFSET reserved size" 2024-11-24 00:23:53 +01:00
ncm
ncsi net/ncsi: Fix the multi thread manner of NCSI driver 2024-11-19 14:19:00 +01:00
netfilter Revert "netfilter: ctnetlink: use helper function to calculate expect ID" 2024-11-24 00:23:56 +01:00
netlabel
netlink Revert "netlink: hold nlk->cb_mutex longer in __netlink_dump_start()" 2024-11-24 00:23:52 +01:00
netrom Make more sysctl constants read-only 2024-11-30 02:15:48 +01:00
nfc
nsh
openvswitch
packet af_packet: Handle outgoing VLAN packets without hardware offloading 2024-11-23 23:20:12 +01:00
phonet Make more sysctl constants read-only 2024-11-30 02:15:48 +01:00
psample
qrtr Revert "net: qrtr: Update packets cloning when broadcasting" 2024-11-24 00:23:18 +01:00
rds Revert "net:rds: Fix possible deadlock in rds_message_put" 2024-11-24 00:23:49 +01:00
rfkill
rose Make more sysctl constants read-only 2024-11-30 02:15:48 +01:00
rxrpc
sched Revert "netem: fix return value if duplicate enqueue fails" 2024-11-24 00:23:51 +01:00
sctp sctp: properly validate chunk size in sctp_sf_ootb() 2024-11-30 02:33:22 +01:00
skb_tracer
smc Revert "net/smc: Allow SMC-D 1MB DMB allocations" 2024-11-24 00:23:56 +01:00
strparser
sunrpc Revert "nfsd: Don't call freezable_schedule_timeout() after each successful page allocation in svc_alloc_arg()." 2024-11-24 00:23:50 +01:00
switchdev
tipc Revert "net: tipc: avoid possible garbage value" 2024-11-24 00:23:28 +01:00
tls
unix Revert "af_unix: Remove put_pid()/put_cred() in copy_peercred()." 2024-11-24 00:23:43 +01:00
vmw_vsock
wimax
wireless Revert "wifi: nl80211: don't give key data to userspace" 2024-11-24 00:23:55 +01:00
x25 Make more sysctl constants read-only 2024-11-30 02:15:48 +01:00
xdp
xfrm Revert "xfrm: Pass flowi_oif or l3mdev as oif to xfrm_dst_lookup" 2024-11-24 00:22:55 +01:00
compat.c
devres.c
Kconfig
Makefile
socket.c
sysctl_net.c
TEST_MAPPING