linux-mainline/net/can
Oliver Hartkopp dac5e62491 can: bcm: add missing rcu read protection for procfs content
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>
2025-05-19 16:58:19 +02:00
..
j1939 can: fix missing decrement of j1939_proto.inuse_idx 2025-04-15 12:18:07 +02:00
af_can.c treewide: Switch/rename to timer_delete[_sync]() 2025-04-05 10:30:12 +02:00
af_can.h can: statistics: use atomic access in hot path 2025-03-14 09:47:00 +01:00
bcm.c can: bcm: add missing rcu read protection for procfs content 2025-05-19 16:58:19 +02:00
gw.c can: gw: fix RCU/BH usage in cgw_create_job() 2025-05-06 15:55:36 +02:00
isotp.c Networking changes for 6.15. 2025-03-26 21:48:21 -07:00
Kconfig
Makefile
proc.c can: statistics: use atomic access in hot path 2025-03-14 09:47:00 +01:00
raw.c can: add protocol counter for AF_CAN sockets 2025-03-14 13:27:33 +01:00