CVE-2022-48931 configfs: fix a race in configfs_{,un}register_subsystem()
A race condition in the Linux kernel's configfs subsystem can lead to a kernel panic, causing a denial of service.
- Exploited in the wild
- Not known
- Login needed
- Any signed-in user
- Attackable
- Local or same network only
- Victim action needed
- Not needed
- Fix
- Available
What is CVE-2022-48931?
CVE-2022-48931 is a medium-severity vulnerability in Linux kernel, published on 22 Aug 2024. It can only be exploited from the same machine or local network, with no action from the victim.
Official description
In the Linux kernel, the following vulnerability has been resolved:
configfs: fix a race in configfs_{,un}register_subsystem()
When configfs_register_subsystem() or configfs_unregister_subsystem() is executing link_group() or unlink_group(), it is possible that two processes add or delete list concurrently. Some unfortunate interleavings of them can cause kernel panic.
One of cases is: A --> B --> C --> D A <-- B <-- C <-- D
delete list_head *B | delete list_head *C --------------------------------|----------------------------------- configfs_unregister_subsystem | configfs_unregister_subsystem unlink_group | unlink_group unlink_obj | unlink_obj list_del_init | list_del_init __list_del_entry | __list_del_entry __list_del | __list_del // next == C | next->prev = prev | | next->prev = prev prev->next = next | | // prev == B | prev->next = next
Fix this by adding mutex when calling link_group() or unlink_group(), but parent configfs_subsystem is NULL when config_item is root. So I create a mutex configfs_subsystem_mutex.
Weakness: CWE-362
Which versions are affected by CVE-2022-48931?
It affects 1 product.
Products include Linux kernel.
How do I fix CVE-2022-48931?
Apply the vendor's patch.
Is CVE-2022-48931 being exploited?
There is no known exploitation of CVE-2022-48931 in the wild and no public exploit code.
Other vulnerabilities in Linux kernel
Sources
Also known as DEBIAN-CVE-2022-48931, GHSA-38qw-v9q4-hm9j, UBUNTU-CVE-2022-48931.