CVE-2023-52522: net: fix possible store tearing in neigh_periodic_work()
In the Linux kernel, the following vulnerability has been resolved:
net: fix possible store tearing in neighperiodicwork()
The Linux kernel CVE team has assigned CVE-2023-52522 to this issue.
Upstream advisory: https://lore.kernel.org/linux-cve-announce/2024030253-CVE-2023-52522-6abd@gregkh/T/#u
Other sources
In the Linux kernel, the following vulnerability has been resolved:
net: fix possible store tearing in neighperiodicwork()
While looking at a related syzbot report involving neighperiodicwork(), I found that I forgot to add an annotation when deleting an RCU protected item from a list.
Readers use rcudeference(np), we need to use either rcuassignpointer() or WRITEONCE() on writer side to prevent store tearing.
I use rcuassignpointer() to have lockdep support, this was the choice made in neighflushdev().
— NVD
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
debian/linuxto a version that resolves this vulnerability.Fixed in 5.10.223-1Fixed in 5.10.234-1Fixed in 6.1.129-1Fixed in 6.1.135-1Fixed in 6.12.25-1Fixed in 6.12.27-1 - Upgrade
Upgrade
redhat/kernelto a version that resolves this vulnerability.Fixed in 5.4.258 - Upgrade
Upgrade
redhat/kernelto a version that resolves this vulnerability.Fixed in 5.10.198 - Upgrade
Upgrade
redhat/kernelto a version that resolves this vulnerability.Fixed in 5.15.135 - Upgrade
Upgrade
redhat/kernelto a version that resolves this vulnerability.Fixed in 6.1.57 - Upgrade
Upgrade
redhat/kernelto a version that resolves this vulnerability.Fixed in 6.5.7 - Upgrade
Upgrade
redhat/kernelto a version that resolves this vulnerability.Fixed in 6.6 - Upgrade
Upgrade
Linux kernelto a version that resolves this vulnerability.Patch CVE-2023-52522 - Configuration
When updating or deleting an RCU protected item/pointer used by readers via rcu_deference(*np), ensure the writer side uses rcu_assign_pointer() (as chosen in neigh_flush_dev()) or WRITE_ONCE() to prevent possible store tearing in neigh_periodic_work().
Linux kernel net: neigh_periodic_work()/writer side (RCU-protected list deletion) RCU writer publication primitive = use rcu_assign_pointer() or WRITE_ONCE() when deleting/updating the RCU-protected pointer to prevent store tearing
Event History
Frequently Asked Questions
What is the severity of CVE-2023-52522?
The severity of CVE-2023-52522 is classified as moderate.
How do I fix CVE-2023-52522?
To fix CVE-2023-52522, upgrade the Linux kernel to version 5.4.258, 5.10.198, 5.15.135, 6.1.57, 6.5.7, or 6.6.
Which Linux kernel versions are affected by CVE-2023-52522?
CVE-2023-52522 affects Linux kernel versions up to 5.4.257, 5.10.197, 5.15.134, 6.1.56, 6.5.6, and all lower.
Is there a workaround for CVE-2023-52522?
There is no specific workaround for CVE-2023-52522 besides upgrading to a fixed version of the kernel.
What does CVE-2023-52522 affect in the Linux kernel?
CVE-2023-52522 affects the network stack, specifically causing possible store tearing in the neigh_periodic_work function.