linux-yocto/net/can
Oliver Hartkopp 63567ecd99 can: bcm: add missing rcu read protection for procfs content
commit dac5e62491 upstream.

When the procfs content is generated for a bcm_op which is in the process
to be removed the procfs output might show unreliable data (UAF).

As the removal of bcm_op's is already implemented with rcu handling this
patch adds the missing rcu_read_lock() and makes sure the list entries
are properly removed under rcu protection.

Fixes: f1b4e32aca ("can: bcm: use call_rcu() instead of costly synchronize_rcu()")
Reported-by: Anderson Nascimento <anderson@allelesecurity.com>
Suggested-by: Anderson Nascimento <anderson@allelesecurity.com>
Tested-by: Anderson Nascimento <anderson@allelesecurity.com>
Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Link: https://patch.msgid.link/20250519125027.11900-2-socketcan@hartkopp.net
Cc: stable@vger.kernel.org # >= 5.4
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-05-29 11:03:19 +02:00
..
j1939 can: j1939: j1939_sk_send_loop(): fix unable to send messages with data length zero 2025-02-21 14:01:33 +01:00
af_can.c can: statistics: use atomic access in hot path 2025-04-10 14:39:31 +02:00
af_can.h can: statistics: use atomic access in hot path 2025-04-10 14:39:31 +02:00
bcm.c can: bcm: add missing rcu read protection for procfs content 2025-05-29 11:03:19 +02:00
gw.c can: gw: fix RCU/BH usage in cgw_create_job() 2025-05-18 08:24:48 +02:00
isotp.c can: isotp: remove ISO 15675-2 specification version where possible 2024-06-20 11:52:56 +02:00
Kconfig can: isotp: remove ISO 15675-2 specification version where possible 2024-06-20 11:52:56 +02:00
Makefile
proc.c can: statistics: use atomic access in hot path 2025-04-10 14:39:31 +02:00
raw.c can: raw: raw_getsockopt(): reduce scope of err 2024-02-20 09:40:46 +01:00