linux-yocto/include
Takamitsu Iwai fb07156cc0 net: rose: convert 'use' field to refcount_t
[ Upstream commit d860d1faa6b2ce3becfdb8b0c2b048ad31800061 ]

The 'use' field in struct rose_neigh is used as a reference counter but
lacks atomicity. This can lead to race conditions where a rose_neigh
structure is freed while still being referenced by other code paths.

For example, when rose_neigh->use becomes zero during an ioctl operation
via rose_rt_ioctl(), the structure may be removed while its timer is
still active, potentially causing use-after-free issues.

This patch changes the type of 'use' from unsigned short to refcount_t and
updates all code paths to use rose_neigh_hold() and rose_neigh_put() which
operate reference counts atomically.

Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Signed-off-by: Takamitsu Iwai <takamitz@amazon.co.jp>
Reviewed-by: Kuniyuki Iwashima <kuniyu@google.com>
Link: https://patch.msgid.link/20250823085857.47674-3-takamitz@amazon.co.jp
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2025-09-04 15:26:28 +02:00
..
acpi ACPICA: Avoid sequence overread in call to strncmp() 2025-06-27 11:07:32 +01:00
asm-generic Drivers: hv: Change hv_free_hyperv_page() to take void * argument 2025-07-06 10:57:58 +02:00
clocksource x86/hyperv: Fix hv tsc page based sched_clock for hibernation 2025-01-09 13:29:56 +01:00
crypto
drm drm/gem: Fix race in drm_gem_handle_create_tail() 2025-07-17 18:32:08 +02:00
dt-bindings ASoC: qcom: q6dsp: add support to more display ports 2025-05-02 07:46:53 +02:00
keys
kunit
kvm
linux atm: atmtcp: Prevent arbitrary write in atmtcp_recv_control(). 2025-09-04 15:26:27 +02:00
math-emu
media media: v4l2-core: v4l2-dv-timings: check cvt/gtf result 2024-12-14 19:54:04 +01:00
memory memory: renesas-rpc-if: Remove Runtime PM wrappers 2024-12-14 19:53:37 +01:00
misc
net net: rose: convert 'use' field to refcount_t 2025-09-04 15:26:28 +02:00
pcmcia
ras
rdma RDMA/uverbs: Propagate errors from rdma_lookup_get_uobject() 2025-06-04 14:40:06 +02:00
rv rv: Reset per-task monitors also for idle tasks 2025-02-21 13:49:47 +01:00
scsi
soc net: mscc: ocelot: treat 802.1ad tagged traffic as 802.1Q-untagged 2025-05-09 09:41:39 +02:00
sound ASoC: soc-dai.h: merge DAI call back functions into ops 2025-08-28 16:26:03 +02:00
target
trace erofs: adapt folios for z_erofs_read_folio() 2025-07-17 18:32:12 +02:00
uapi bonding: Add independent control state machine 2025-08-28 16:26:18 +02:00
ufs scsi: ufs: core: Fix the HIGH/LOW_TEMP Bit Definitions 2025-02-21 13:49:42 +01:00
vdso
video
xen xen/mcelog: Add __nonstring annotations for unterminated strings 2025-04-25 10:43:27 +02:00