android_kernel_motorola_sm6375/net
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Matthieu Baerts (NGI0) cf387cdebf sctp: sysctl: auth_enable: avoid using current->nsproxy
commit 15649fd5415eda664ef35780c2013adeb5d9c695 upstream.

As mentioned in a previous commit of this series, using the 'net'
structure via 'current' is not recommended for different reasons:

- Inconsistency: getting info from the reader's/writer's netns vs only
  from the opener's netns.

- current->nsproxy can be NULL in some cases, resulting in an 'Oops'
  (null-ptr-deref), e.g. when the current task is exiting, as spotted by
  syzbot [1] using acct(2).

The 'net' structure can be obtained from the table->data using
container_of().

Note that table->data could also be used directly, but that would
increase the size of this fix, while 'sctp.ctl_sock' still needs to be
retrieved from 'net' structure.

Fixes: b14878ccb7 ("net: sctp: cache auth_enable per endpoint")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/67769ecb.050a0220.3a8527.003f.GAE@google.com [1]
Suggested-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Matthieu Baerts (NGI0) <matttbe@kernel.org>
Link: https://patch.msgid.link/20250108-net-sysctl-current-nsproxy-v1-6-5df34b2083e8@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Magali Lemes <magali.lemes@canonical.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-04-10 14:29:35 +02:00
..
6lowpan
9p 9p/xen: fix release of IRQ 2024-12-14 19:44:41 +01:00
802 net: 802: LLC+SNAP OID:PID lookup on start of skb data 2025-02-01 18:18:45 +01:00
8021q vlan: fix memory leak in vlan_newlink() 2025-04-10 14:29:34 +02:00
appletalk
atm
ax25
batman-adv batman-adv: Drop unmanaged ELP metric worker 2025-03-13 12:43:24 +01:00
bluetooth Bluetooth: L2CAP: handle NULL sock pointer in l2cap_sock_alloc 2025-03-13 12:43:07 +01:00
bpf
bpfilter
bridge netfilter: Replace zero-length array with flexible-array member 2025-01-09 13:23:35 +01:00
caif
can can: j1939: j1939_sk_send_loop(): fix unable to send messages with data length zero 2025-03-13 12:43:16 +01:00
ceph
core drop_monitor: fix incorrect initialization order 2025-03-13 12:43:26 +01:00
dcb
dccp net: fix data-races around sk->sk_forward_alloc 2025-02-01 18:18:52 +01:00
decnet
dns_resolver
dsa
ethernet
hsr
ieee802154 net: ieee802154: do not leave a dangling sk pointer in ieee802154_create() 2024-12-14 19:44:51 +01:00
ife
ipv4 net-timestamp: support TCP GSO case for a few missing flags 2025-03-13 12:43:30 +01:00
ipv6 net: ipv6: fix missing dst ref drop in ila lwtunnel 2025-03-13 12:43:30 +01:00
iucv
kcm
key
l2tp
l3mdev
lapb
llc llc: do not use skb_get() before dev_queue_xmit() 2025-03-13 12:43:29 +01:00
mac80211 wifi: mac80211: wake the queues in case of failure in resume 2025-01-09 13:23:35 +01:00
mac802154 mac802154: check local interfaces before deleting sdata list 2025-02-01 18:18:50 +01:00
mpls
ncsi net/ncsi: wait for the last response to Deselect Package before configuring channel 2025-03-13 12:43:11 +01:00
netfilter netfilter: Replace zero-length array with flexible-array member 2025-01-09 13:23:35 +01:00
netlabel
netlink netlink: terminate outstanding dump on socket close 2024-12-14 19:44:18 +01:00
netrom netrom: check buffer length before accessing it 2025-01-09 13:23:35 +01:00
nfc NFC: nci: Add bounds checking in nci_hci_create_pipe() 2025-03-13 12:43:11 +01:00
nsh
openvswitch openvswitch: use RCU protection in ovs_vport_cmd_fill_info() 2025-03-13 12:43:18 +01:00
packet af_packet: fix vlan_get_protocol_dgram() vs MSG_PEEK 2025-01-09 13:23:35 +01:00
phonet
psample
qrtr
rds
rfkill net: rfkill: gpio: Add check for clk_enable() 2024-12-14 19:44:27 +01:00
rose net: rose: lock the socket in rose_bind() 2025-03-13 12:43:06 +01:00
rxrpc
sched pfifo_tail_enqueue: Drop new packet when sch->limit == 0 2025-03-13 12:43:25 +01:00
sctp sctp: sysctl: auth_enable: avoid using current->nsproxy 2025-04-10 14:29:35 +02:00
smc net/smc: check sndbuf_space again after NOSPACE flag is set in smc_poll 2025-01-09 13:23:27 +01:00
strparser
sunrpc sunrpc: suppress warnings for unused procfs functions 2025-03-13 12:43:24 +01:00
switchdev
tipc tipc: fix NULL deref in cleanup_bearer() 2024-12-19 18:05:03 +01:00
tls tls: Fix tls_sw_sendmsg error handling 2025-02-01 18:18:45 +01:00
unix
vmw_vsock vsock: Allow retrying on connect() failure 2025-03-13 12:43:00 +01:00
wimax
wireless wifi: nl80211: reject cooked mode if it is set along with other flags 2025-03-13 12:43:28 +01:00
x25
xdp
xfrm
compat.c
Kconfig
Makefile
socket.c
sysctl_net.c