Description
In the Linux kernel, the following vulnerability has been resolved: can: isotp: use unconditional synchronize_rcu() in isotp_release() isotp_notify() unregisters the (RCU) CAN filters via can_rx_unregister() and clears so->bound without waiting for a grace period. isotp_release() uses so->bound to decide whether it needs to call synchronize_rcu() before cancelling so->rxtimer, so when NETDEV_UNREGISTER runs first it skips that synchronize_rcu() and can cancel the timer while an in-flight isotp_rcv() is still executing and about to re-arm it via isotp_send_fc(), leading to a use-after-free timer callback on the freed socket. sakisho-bot remarked a problem with rtnl_lock held in isotp_notify(), therefore make isotp_release() always call synchronize_rcu() before cancelling the timers, regardless of so->bound. This still closes the original race (isotp_notify() clearing so->bound without waiting for in-flight isotp_rcv() callers before isotp_release() cancels the RX timer) without adding any RCU wait to the netdevice notifier path.
Affected products
Version statuses are supplied by the assigning organization. Consult the original record for detailed ranges and platform conditions.
Linux Linux
Default version status: unaffected
22bfa94db2ef6900c790884fa9461486516626e9 to < 945d9894502cd9124f5d676181c542ed2000f7c0affected14a4696bc3118ba49da28f79280e1d55603aa737 to < 59672aa4bcd8d32172c1ff6a179583981d6acabcaffected14a4696bc3118ba49da28f79280e1d55603aa737 to < 15413a082df69175c2f96aeab4c26fe1ff7cff03affected14a4696bc3118ba49da28f79280e1d55603aa737 to < 6280eda96e0707264849fa7d036fed873c1f8a6daffected14a4696bc3118ba49da28f79280e1d55603aa737 to < cb6abc584a1bfab107ac003d64948a4aef1730aaaffected14a4696bc3118ba49da28f79280e1d55603aa737 to < b88a511308779c225005d7994b8744561bdbafbcaffected14a4696bc3118ba49da28f79280e1d55603aa737 to < b8278ff605187ef3fa0f2705e93251cce4c4f8eeaffected14a4696bc3118ba49da28f79280e1d55603aa737 to < 9b1a02e0d980ac6b0e36a90378f847062f81d7e4affected80c6ddf771df2ef786f28c1ca5919b3f1080091baffectedebf91625b3e404bd2b4b694c7ee71c1e8f8bd08faffected5.10.50 to < 5.10.261affected5.12.17 to < 5.13affected5.13.2 to < 5.14affected
Linux Linux
Default version status: affected
5.14affected0 to < 5.14unaffected5.10.261 to ≤ 5.10.*unaffected5.15.212 to ≤ 5.15.*unaffected6.1.178 to ≤ 6.1.*unaffected6.6.145 to ≤ 6.6.*unaffected6.12.97 to ≤ 6.12.*unaffected6.18.40 to ≤ 6.18.*unaffected7.1.5 to ≤ 7.1.*unaffected7.2 to ≤ *unaffected
References
- https://git.kernel.org/stable/c/945d9894502cd9124f5d676181c542ed2000f7c0 ↗
- https://git.kernel.org/stable/c/59672aa4bcd8d32172c1ff6a179583981d6acabc ↗
- https://git.kernel.org/stable/c/15413a082df69175c2f96aeab4c26fe1ff7cff03 ↗
- https://git.kernel.org/stable/c/6280eda96e0707264849fa7d036fed873c1f8a6d ↗
- https://git.kernel.org/stable/c/cb6abc584a1bfab107ac003d64948a4aef1730aa ↗
- https://git.kernel.org/stable/c/b88a511308779c225005d7994b8744561bdbafbc ↗
- https://git.kernel.org/stable/c/b8278ff605187ef3fa0f2705e93251cce4c4f8ee ↗
- https://git.kernel.org/stable/c/9b1a02e0d980ac6b0e36a90378f847062f81d7e4 ↗