linux/net
Marcelo Ricardo Leitner 92b74375a1 sctp: add size validation when walking chunks
[ Upstream commit 50619dbf8d ]

The first chunk in a packet is ensured to be present at the beginning of
sctp_rcv(), as a packet needs to have at least 1 chunk. But the second
one, may not be completely available and ch->length can be over
uninitialized memory.

Fix here is by only trying to walk on the next chunk if there is enough to
hold at least the header, and then proceed with the ch->length validation
that is already there.

Reported-by: Ilja Van Sprundel <ivansprundel@ioactive.com>
Signed-off-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
History 2021-07-19 10:04:46 +02:00
..
6lowpan 6lowpan: Fix some typos in nhc_udp.c 2021-03-24 17:52:11 -07:00
9p net: 9p: Correct function names in the kerneldoc comments 2021-03-28 17:56:56 -07:00
802 net: 802: psnap.c: Use built-in RCU list checking 2020-02-24 13:02:53 -08:00
8021q Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-04-26 12:00:00 -07:00
appletalk net: appletalk: fix the usage of preposition 2021-06-08 11:37:41 -07:00
atm net: atm: pppoatm: use new API for wakeup tasklet 2021-01-29 18:24:05 -08:00
ax25 net/ax25: Delete obsolete TODO file 2021-03-30 16:54:50 -07:00
batman-adv batman-adv: Avoid WARN_ON timing related checks 2021-05-18 21:10:01 +02:00
bluetooth Bluetooth: mgmt: Fix the command returns garbage parameter value 2021-07-19 10:04:46 +02:00
bpf bpf: selftests: Add kfunc_call test 2021-03-26 20:41:52 -07:00
bpfilter bpfilter: Specify the log level for the kmsg message 2021-07-14 17:07:20 +02:00
bridge net: bridge: mrp: Update ring transitions. 2021-07-19 10:04:36 +02:00
caif net: caif: fix memory leak in cfusbl_device_notify 2021-06-03 15:05:07 -07:00
can can: j1939: j1939_sk_setsockopt(): prevent allocation of j1939 filter for optlen == 0 2021-07-14 17:07:17 +02:00
ceph libceph: set global_id as soon as we get an auth ticket 2021-06-24 21:03:17 +02:00
core net: retrieve netns cookie via getsocketopt 2021-07-19 10:04:44 +02:00
dcb net: dcb: use obj-$(CONFIG_DCB) form in net/Makefile 2021-01-27 17:03:52 -08:00
dccp net: dccp: use net_generic storage 2021-04-09 16:34:56 -07:00
decnet net/decnet: Delete obsolete TODO file 2021-03-30 16:54:50 -07:00
dns_resolver net: remove redundant 'depends on NET' 2021-01-27 17:04:12 -08:00
dsa net: dsa: tag_8021q: fix the VLAN IDs used for encoding sub-VLANs 2021-06-01 15:02:05 -07:00
ethernet of: net: pass the dst buffer to of_get_mac_address() 2021-04-13 14:35:02 -07:00
ethtool ethtool: strset: fix message length calculation 2021-06-14 12:14:24 -07:00
hsr net: hsr: don't check sequence number if tag removal is offloaded 2021-07-19 10:04:40 +02:00
ieee802154 ieee802154: fix error return code in ieee802154_llsec_getparams() 2021-06-03 10:59:49 +02:00
ife net: remove redundant 'depends on NET' 2021-01-27 17:04:12 -08:00
ipv4 net: ip: avoid OOM kills with large UDP sends over loopback 2021-07-19 10:04:44 +02:00
ipv6 net: ip: avoid OOM kills with large UDP sends over loopback 2021-07-19 10:04:44 +02:00
iucv iucv: af_iucv.c: Couple of typo fixes 2021-03-28 17:31:13 -07:00
kcm revert "net: kcm: fix memory leak in kcm_sendmsg" 2021-06-07 13:34:37 -07:00
key af_key: relax availability checks for skb size calculation 2021-01-04 10:05:50 +01:00
l2tp net: fix a concurrency bug in l2tp_tunnel_register() 2021-04-27 14:23:13 -07:00
l3mdev l3mdev: Correct function names in the kerneldoc comments 2021-03-28 17:56:55 -07:00
lapb net: lapb: Make "lapb_t1timer_running" able to detect an already running timer 2021-03-23 14:14:50 -07:00
llc llc2: Remove redundant assignment to rc 2021-04-27 14:16:14 -07:00
mac80211 mac80211: Properly WARN on HW scan before restart 2021-07-19 10:04:44 +02:00
mac802154 net: mac802154: Fix general protection fault 2021-04-06 22:42:16 +02:00
mpls mpls: Remove redundant assignment to err 2021-04-27 14:17:00 -07:00
mptcp mptcp: avoid race on msk state changes 2021-07-14 17:07:15 +02:00
ncsi Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-04-09 20:48:35 -07:00
netfilter netfilter: nf_tables: do not allow to delete table with owner by handle 2021-07-14 17:07:14 +02:00
netlabel netlabel: Fix memory leak in netlbl_mgmt_add_common 2021-07-14 17:07:06 +02:00
netlink netlink: disable IRQs for netlink_lock_table() 2021-05-17 15:31:03 -07:00
netrom net: netrom: nr_in: Remove redundant assignment to ns 2021-04-28 13:59:08 -07:00
nfc nfc: fix NULL ptr dereference in llcp_sock_getname() after failed connect 2021-05-31 22:43:27 -07:00
nsh treewide: replace '---help---' in Kconfig files with 'help' 2020-06-14 01:57:21 +09:00
openvswitch openvswitch: meter: fix race when getting now_ms. 2021-05-13 15:54:59 -07:00
packet net/packet: annotate accesses to po->ifindex 2021-06-16 12:48:18 -07:00
phonet treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
psample psample: Add additional metadata attributes 2021-03-14 15:00:43 -07:00
qrtr net: qrtr: ns: Fix error return code in qrtr_ns_init() 2021-07-14 17:06:57 +02:00
rds net: rds: fix memory leak in rds_recvmsg 2021-06-08 16:32:17 -07:00
rfkill Another set of updates, all over the map: 2021-04-20 16:44:04 -07:00
rose net: rose: Fix fall-through warnings for Clang 2021-03-10 12:45:15 -08:00
rxrpc Networking changes for 5.13. 2021-04-29 11:57:23 -07:00
sched net: sched: fix error return code in tcf_del_walker() 2021-07-19 10:04:41 +02:00
sctp sctp: add size validation when walking chunks 2021-07-19 10:04:46 +02:00
smc Networking fixes for 5.13-rc4, including fixes from bpf, netfilter, 2021-05-26 17:44:49 -10:00
strparser Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2019-06-22 08:59:24 -04:00
sunrpc SUNRPC: Should wake up the privileged task firstly. 2021-07-14 17:06:11 +02:00
switchdev net: bridge: propagate extack through switchdev_port_attr_set 2021-02-14 17:38:11 -08:00
tipc net: tipc: fix FB_MTU eat two pages 2021-07-14 17:07:23 +02:00
tls tls: prevent oversized sendfile() hangs by ignoring MSG_MORE 2021-07-14 17:07:13 +02:00
unix net/af_unix: fix a data-race in unix_dgram_sendmsg / unix_release_sock 2021-06-16 12:51:55 -07:00
vmw_vsock vsock: notify server to shutdown when client has pending signal 2021-07-19 10:04:42 +02:00
wireless cfg80211: fix default HE tx bitrate mask in 2G band 2021-07-19 10:04:44 +02:00
x25 net/x25: Return the correct errno code 2021-06-03 15:13:56 -07:00
xdp xsk: Fix broken Tx ring validation 2021-07-14 17:07:07 +02:00
xfrm xfrm: Fix error reporting in xfrm_state_construct. 2021-07-19 10:04:39 +02:00
compat.c net: Return the correct errno code 2021-06-03 15:13:56 -07:00
devres.c net: devres: rename the release callback of devm_register_netdev() 2020-06-30 15:57:34 -07:00
Kconfig bpf, kconfig: Add consolidated menu entry for bpf with core options 2021-05-11 13:56:16 -07:00
Makefile net: l3mdev: use obj-$(CONFIG_NET_L3_MASTER_DEV) form in net/Makefile 2021-01-27 17:03:52 -08:00
socket.c net: make get_net_ns return error if NET_NS is disabled 2021-06-12 13:13:08 -07:00
sysctl_net.c net: Ensure net namespace isolation of sysctls 2021-04-12 13:27:11 -07:00