Junxi Qian
d3d47118ab
UPSTREAM: nfc: llcp: add missing return after LLCP_CLOSED checks
...
In nfc_llcp_recv_hdlc() and nfc_llcp_recv_disc(), when the socket
state is LLCP_CLOSED, the code correctly calls release_sock() and
nfc_llcp_sock_put() but fails to return. Execution falls through to
the remainder of the function, which calls release_sock() and
nfc_llcp_sock_put() again. This results in a double release_sock()
and a refcount underflow via double nfc_llcp_sock_put(), leading to
a use-after-free.
Add the missing return statements after the LLCP_CLOSED branches
in both functions to prevent the fall-through.
Bug: 499350302
Fixes: d646960f79 ("NFC: Initial LLCP support")
Signed-off-by: Junxi Qian <qjx1298677004@gmail.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20260408081006.3723-1-qjx1298677004@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit 2b5dd4632966c39da6ba74dbc8689b309065e82c)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: I041f20fc1fea32f715d2646579fab071e58688d8
2026-09-09 00:38:21 +03:00
..
6lowpan
9p
net/9p: fix double req put in p9_fd_cancelled
2025-10-29 13:59:54 +01:00
802
net: 802: LLC+SNAP OID:PID lookup on start of skb data
2025-02-01 18:18:45 +01:00
8021q
net: vlan: sync VLAN features with lower device
2025-12-03 12:45:15 +01:00
appletalk
net: appletalk: Fix use-after-free in AARP proxy probe
2025-08-28 16:21:17 +02:00
atm
net: atm: fix memory leak in atm_register_sysfs when device_register fail
2025-09-09 18:43:58 +02:00
ax25
BACKPORT: net: Make sock protocol value checks more specific
2025-12-23 13:35:52 -08:00
batman-adv
batman-adv: fix OOB read/write in network-coding decode
2025-09-09 18:43:59 +02:00
bluetooth
This is the 5.4.302 stable release
2025-12-11 09:41:30 +00:00
bpf
UPSTREAM: bpf: Move skb->len == 0 checks into __bpf_redirect
2026-01-14 18:13:04 -08:00
bpfilter
UPSTREAM: net/bpfilter: Initialize pos in __bpfilter_process_sockopt
2026-02-01 20:44:55 -08:00
bridge
Merge tag 'LA.UM.9.14.1.r1-21100-QCM6490.QISI15.0' of https://git.codelinaro.org/clo/la/kernel/msm-5.4 into android13-5.4-lahaina
2026-04-30 20:46:30 +03:00
caif
This is the 5.4.297 stable release
2025-09-02 10:52:40 +00:00
can
This is the 5.4.300 stable release
2025-10-02 13:53:47 +00:00
ceph
libceph: fix race between delayed_work() and ceph_monc_stop()
2024-07-18 11:40:55 +02:00
core
net: skbuff: fix missing zerocopy reference in pskb_carve helpers
2026-07-29 03:40:57 +06:00
dcb
net: dcb: choose correct policy to parse DCB_ATTR_BCN
2023-08-11 11:53:57 +02:00
dccp
net: fix data-races around sk->sk_forward_alloc
2025-02-01 18:18:52 +01:00
decnet
dns_resolver
dsa
net: dsa: microchip: linearize skb for tail-tagging switches
2025-09-09 18:44:00 +02:00
embms_kernel
ethernet
ethernet: Add helper for assigning packet type when dest address does not match device address
2024-05-02 16:18:36 +02:00
hsr
hsr: Handle failures in module init
2024-03-26 18:22:25 -04:00
ieee802154
net: ieee802154: do not leave a dangling sk pointer in ieee802154_create()
2024-12-14 19:44:51 +01:00
ife
net: sched: ife: fix potential use-after-free
2024-01-08 11:29:44 +01:00
ipv4
tcp: fix an incorrect __user annotation on tcp_use_userconfig_sysctl_handler
2026-07-29 03:30:09 +06:00
ipv6
ipv6: icmp: clear skb2->cb[] in ip6_err_gen_icmpv6_unreach()
2026-07-29 03:40:57 +06:00
iucv
s390/iucv: fix receive buffer virtual vs physical address confusion
2024-09-04 13:14:57 +02:00
kcm
kcm: Serialise kcm_sendmsg() for the same socket.
2024-09-04 13:14:59 +02:00
key
net: af_key: fix sadb_x_filter validation
2023-08-30 16:27:16 +02:00
l2tp
Revert "genetlink: hold RCU in genlmsg_mcast()"
2024-11-09 16:39:42 +00:00
l3mdev
lapb
llc
llc: fix data loss when reading from a socket in llc_ui_recvmsg()
2025-06-04 14:32:35 +02:00
mac80211
Merge android11-5.4.302(91d385eb) into msm-5.4
2026-01-30 11:41:11 +05:30
mac802154
This is the 5.4.290 stable release
2025-02-05 17:00:16 +00:00
mpls
BACKPORT: sysctl: pass kernel pointers to ->proc_handler
2025-12-23 13:36:15 -08:00
ncsi
net: ncsi: Fix buffer overflow in fetching version id
2025-08-28 16:21:27 +02:00
netfilter
Merge tag 'LA.UM.9.14.1.r1-21100-QCM6490.QISI15.0' of https://git.codelinaro.org/clo/la/kernel/msm-5.4 into android13-5.4-lahaina
2026-04-30 20:46:30 +03:00
netlabel
calipso: unlock rcu before returning -EAFNOSUPPORT
2025-06-27 11:02:50 +01:00
netlink
UPSTREAM: bpf: Refactor bpf_iter_reg to have separate seq_info member
2026-01-14 18:12:07 -08:00
netrom
netrom: check buffer length before accessing it
2025-01-09 13:23:35 +01:00
neuron
nfc
UPSTREAM: nfc: llcp: add missing return after LLCP_CLOSED checks
2026-09-09 00:38:21 +03:00
nsh
nsh: Restore skb->{protocol,data,mac_header} for outer header in nsh_gso_segment().
2024-05-17 11:43:49 +02:00
openvswitch
net: openvswitch: remove never-working support for setting nsh fields
2025-12-03 12:45:20 +01:00
packet
net: fix fanout UAF in packet_release() via NETDEV_UP race
2026-07-29 03:40:57 +06:00
phonet
BACKPORT: sysctl: pass kernel pointers to ->proc_handler
2025-12-23 13:36:15 -08:00
psample
Revert "psample: Require 'CAP_NET_ADMIN' when joining "packets" group"
2023-12-18 20:13:34 +00:00
qrtr
Merge android11-5.4.289(4c8fb32) into msm-5.4
2025-03-26 11:56:22 +05:30
rds
BACKPORT: tcp: add tcp_sock_set_keepidle
2026-01-14 17:50:47 -08:00
rfkill
BACKPORT: compat_ioctl: move more drivers to compat_ptr_ioctl
2026-05-08 21:46:20 +02:00
rose
rose: fix dangling neighbour pointers in rose_rt_device_down()
2025-07-17 18:25:00 +02:00
rxrpc
rxrpc: Fix oops due to non-existence of prealloc backlog struct
2025-07-17 18:25:02 +02:00
sched
Merge android11-5.4.302(91d385eb) into msm-5.4
2026-01-30 11:41:11 +05:30
sctp
Revert "net, sctp, filter: remap copy_from_user failure error"
2026-02-01 20:44:59 -08: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
strparser: Fix signed/unsigned mismatch bug
2025-12-03 12:45:19 +01:00
sunrpc
BACKPORT: tcp: add tcp_sock_set_keepidle
2026-01-14 17:50:47 -08:00
switchdev
tipc
This is the 5.4.302 stable release
2025-12-11 09:41:30 +00:00
tls
UPSTREAM: net, sk_msg: Annotate lockless access to sk_prot on clone
2025-12-23 13:36:03 -08:00
unix
af_unix: Remove put_pid()/put_cred() in copy_peercred().
2024-09-12 11:03:52 +02:00
vmw_vsock
This is the 5.4.302 stable release
2025-12-11 09:41:30 +00:00
wimax
wireless
Revert "wifi: cfg80211: Increase akm_suites array size in"
2026-05-05 20:02:19 +03:00
x25
net/x25: fix incorrect parameter validation in the x25_getsockopt() function
2024-03-26 18:22:18 -04:00
xdp
UPSTREAM: bpf: Allow for map-in-map with dynamic inner array map entries
2026-01-14 18:12:44 -08:00
xfrm
BACKPORT: net: Fix Kconfig indentation, continued
2026-02-01 20:39:45 -08:00
compat.c
BACKPORT: net: simplify cBPF setsockopt compat handling
2026-01-14 18:12:33 -08:00
Kconfig
BACKPORT: bpf: Clean up sockmap related Kconfigs
2026-02-01 20:44:37 -08:00
Makefile
Merge android11-5.4.249+ ( d57e792) into msm-5.4
2023-09-28 16:45:28 +05:30
OWNERS
socket.c
This is the 5.4.267 stable release
2024-01-16 11:29:17 +00:00
sysctl_net.c
TEST_MAPPING