Linux: Concurrent Execution using Shared Resource with Improper Synchronization
CVE-2024-35899 is a high-severity concurrent execution using shared resource with improper synchronization vulnerability in Linux, with a CVSS 3.1 base score of 7.3 out of 10. It can be exploited with local access to the system by an attacker with a low-privileged account, but only if a user takes part, for example by opening a link or file. The record lists versions f4e14695fe805eb0f0cb36e0ad6a560b9f985e86, 46c4481938e2ca62343b16ea83ab28f4c1733d31, f7e3c88cc2a977c2b9a8aa52c1ce689e7b394e49 as the first without the flaw, so updating Linux to one of those releases or later removes the exposure. There is no confirmed exploitation so far. EPSS estimates a 0.2% chance of exploitation within 30 days, which is low compared with other CVEs.
High severity with no evidence of exploitation so far.
What to do
- Update Linux to f4e14695fe805eb0f0cb36e0ad6a560b9f985e86 or 46c4481938e2ca62343b16ea83ab28f4c1733d31 or f7e3c88cc2a977c2b9a8aa52c1ce689e7b394e49 or 4e8447a9a3d367b5065a0b7abe101da6e0037b6e, whichever matches your release line, or a later version.
- Update linux_kernel to f4e14695fe80 or 46c4481938e2 or f7e3c88cc2a9 or 4e8447a9a3d3, whichever matches your release line, or a later version.
- Update SIMATIC S7-1500 TM MFP - GNU/Linux subsystem to V1.1.1 or a later version.
- Because the attack needs a user to take part, warn users about unexpected links and files related to this product until it is patched.
Affected products and versions
| Vendor | Product | Affected versions | Fixed in |
|---|---|---|---|
| Linux | Linux | 0935d558840099b3679c67bb7468dc78fcbad940 up to, but not including, f4e14695fe805eb0f0cb36e0ad6a560b9f985e86; 0935d558840099b3679c67bb7468dc78fcbad940 up to, but not including, 46c4481938e2ca62343b16ea83ab28f4c1733d31; 0935d558840099b3679c67bb7468dc78fcbad940 up to, but not including, f7e3c88cc2a977c2b9a8aa52c1ce689e7b394e49; 0935d558840099b3679c67bb7468dc78fcbad940 up to, but not including, 4e8447a9a3d367b5065a0b7abe101da6e0037b6e; 0935d558840099b3679c67bb7468dc78fcbad940 up to, but not including, 333b5085522cf1898d5a0d92616046b414f631a7; 0935d558840099b3679c67bb7468dc78fcbad940 up to, but not including, d2c9eb19fc3b11caebafde4c30a76a49203d18a6; 0935d558840099b3679c67bb7468dc78fcbad940 up to, but not including, 24cea9677025e0de419989ecb692acd4bb34cac2; 4.20 | f4e14695fe805eb0f0cb36e0ad6a560b9f985e86, 46c4481938e2ca62343b16ea83ab28f4c1733d31, f7e3c88cc2a977c2b9a8aa52c1ce689e7b394e49, 4e8447a9a3d367b5065a0b7abe101da6e0037b6e, 333b5085522cf1898d5a0d92616046b414f631a7, d2c9eb19fc3b11caebafde4c30a76a49203d18a6 |
| Linux | linux_kernel | 0935d5588400 up to, but not including, f4e14695fe80; 0935d5588400 up to, but not including, 46c4481938e2; 0935d5588400 up to, but not including, f7e3c88cc2a9; 0935d5588400 up to, but not including, 4e8447a9a3d3; 0935d5588400 up to, but not including, 333b5085522c; 0935d5588400 up to, but not including, d2c9eb19fc3b; 0935d5588400 up to, but not including, 24cea9677025; 4.20 | f4e14695fe80, 46c4481938e2, f7e3c88cc2a9, 4e8447a9a3d3, 333b5085522c, d2c9eb19fc3b |
| Siemens | SIMATIC S7-1500 TM MFP - GNU/Linux subsystem | before V1.1.1 | V1.1.1 |
| Debian | Debian Linux | 10.0 | Not stated |
Version data comes from the organisation that assigned the CVE. Confirm against the vendor advisory before deciding you are unaffected.
How the severity score breaks down
- Attack vector
- LocalThe attacker needs local access or must trick a user into running something.
- Attack complexity
- LowNo special conditions are needed; the attack works reliably.
- Privileges required
- LowA basic user account is enough.
- User interaction
- RequiredA user must take an action such as opening a file or link.
- Scope
- UnchangedImpact stays within the vulnerable component.
- Confidentiality
- HighAll data handled by the component can be read.
- Integrity
- HighData or code can be modified at will.
- Availability
- HighThe component can be taken down completely.
Vector: CVSS:3.1/AV:L/AC:L/PR:L/UI:R/S:U/C:H/I:H/A:H. Scored by CNA.
| Scoring system | Score | Severity | Scored by |
|---|---|---|---|
| CVSS 3.1 | 7.3 | High | CNA |
| CVSS 3.1 | 6.1 | Medium | CISA (ADP) |
Official description
In the Linux kernel, the following vulnerability has been resolved: netfilter: nf_tables: flush pending destroy work before exit_net release Similar to 2c9f0293280e ("netfilter: nf_tables: flush pending destroy work before netlink notifier") to address a race between exit_net and the destroy workqueue. The trace below shows an element to be released via destroy workqueue while exit_net path (triggered via module removal) has already released the set that is used in such transaction. [ 1360.547789] BUG: KASAN: slab-use-after-free in nf_tables_trans_destroy_work+0x3f5/0x590 [nf_tables] [ 1360.547861] Read of size 8 at addr ffff888140500cc0 by task kworker/4:1/152465 [ 1360.547870] CPU: 4 PID: 152465 Comm: kworker/4:1 Not tainted 6.8.0+ #359 [ 1360.547882] Workqueue: events nf_tables_trans_destroy_work [nf_tables] [ 1360.547984] Call Trace: [ 1360.547991] <TASK> [ 1360.547998] dump_stack_lvl+0x53/0x70 [ 1360.548014] print_report+0xc4/0x610 [ 1360.548026] ? __virt_addr_valid+0xba/0x160 [ 1360.548040] ? __pfx__raw_spin_lock_irqsave+0x10/0x10 [ 1360.548054] ? nf_tables_trans_destroy_work+0x3f5/0x590 [nf_tables] [ 1360.548176] kasan_report+0xae/0xe0 [ 1360.548189] ? nf_tables_trans_destroy_work+0x3f5/0x590 [nf_tables] [ 1360.548312] nf_tables_trans_destroy_work+0x3f5/0x590 [nf_tables] [ 1360.548447] ? __pfx_nf_tables_trans_destroy_work+0x10/0x10 [nf_tables] [ 1360.548577] ? _raw_spin_unlock_irq+0x18/0x30 [ 1360.548591] process_one_work+0x2f1/0x670 [ 1360.548610] worker_thread+0x4d3/0x760 [ 1360.548627] ? __pfx_worker_thread+0x10/0x10 [ 1360.548640] kthread+0x16b/0x1b0 [ 1360.548653] ? __pfx_kthread+0x10/0x10 [ 1360.548665] ret_from_fork+0x2f/0x50 [ 1360.548679] ? __pfx_kthread+0x10/0x10 [ 1360.548690] ret_from_fork_asm+0x1a/0x30 [ 1360.548707] </TASK> [ 1360.548719] Allocated by task 192061: [ 1360.548726] kasan_save_stack+0x20/0x40 [ 1360.548739] kasan_save_track+0x14/0x30 [ 1360.548750] __kasan_kmalloc+0x8f/0xa0 [ 1360.548760] __kmalloc_node+0x1f1/0x450 [ 1360.548771] nf_tables_newset+0x10c7/0x1b50 [nf_tables] [ 1360.548883] nfnetlink_rcv_batch+0xbc4/0xdc0 [nfnetlink] [ 1360.548909] nfnetlink_rcv+0x1a8/0x1e0 [nfnetlink] [ 1360.548927] netlink_unicast+0x367/0x4f0 [ 1360.548935] netlink_sendmsg+0x34b/0x610 [ 1360.548944] ____sys_sendmsg+0x4d4/0x510 [ 1360.548953] ___sys_sendmsg+0xc9/0x120 [ 1360.548961] __sys_sendmsg+0xbe/0x140 [ 1360.548971] do_syscall_64+0x55/0x120 [ 1360.548982] entry_SYSCALL_64_after_hwframe+0x55/0x5d [ 1360.548994] Freed by task 192222: [ 1360.548999] kasan_save_stack+0x20/0x40 [ 1360.549009] kasan_save_track+0x14/0x30 [ 1360.549019] kasan_save_free_info+0x3b/0x60 [ 1360.549028] poison_slab_object+0x100/0x180 [ 1360.549036] __kasan_slab_free+0x14/0x30 [ 1360.549042] kfree+0xb6/0x260 [ 1360.549049] __nft_release_table+0x473/0x6a0 [nf_tables] [ 1360.549131] nf_tables_exit_net+0x170/0x240 [nf_tables] [ 1360.549221] ops_exit_list+0x50/0xa0 [ 1360.549229] free_exit_list+0x101/0x140 [ 1360.549236] unregister_pernet_operations+0x107/0x160 [ 1360.549245] unregister_pernet_subsys+0x1c/0x30 [ 1360.549254] nf_tables_module_exit+0x43/0x80 [nf_tables] [ 1360.549345] __do_sys_delete_module+0x253/0x370 [ 1360.549352] do_syscall_64+0x55/0x120 [ 1360.549360] entry_SYSCALL_64_after_hwframe+0x55/0x5d (gdb) list *__nft_release_table+0x473 0x1e033 is in __nft_release_table (net/netfilter/nf_tables_api.c:11354). 11349 list_for_each_entry_safe(flowtable, nf, &table->flowtables, list) { 11350 list_del(&flowtable->list); 11351 nft_use_dec(&table->use); 11352 nf_tables_flowtable_destroy(flowtable); 11353 } 11354 list_for_each_entry_safe(set, ns, &table->sets, list) { 11355 list_del(&set->list); 11356 nft_use_dec(&table->use); 11357 if (set->flags & (NFT_SET_MAP | NFT_SET_OBJECT)) 11358 nft_map_deactivat ---truncated---
Source: the CVE record as published by its numbering authority, via NVD and CVE.org.
The underlying weakness: Concurrent Execution using Shared Resource with Improper Synchronization
The product contains a concurrent code sequence that requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence operating concurrently.
How developers prevent this class of flaw
- In languages that support it, use synchronization primitives. Only wrap these around critical code to minimize the impact on performance.
- Use thread-safe capabilities such as the data access abstraction in Spring.
- Minimize the usage of shared resources in order to remove as much complexity as possible from the control flow and to reduce the likelihood of unexpected conditions occurring. Additionally, this will minimize the amount of synchronization necessary and may even help to reduce the likelihood of a denial of service where an attacker may be able to repeatedly trigger a critical section (CWE-400).
Timeline
- CVE record published.
- CISA published its SSVC assessment (exploitation: none, automatable: no, technical impact: partial).
- Record last changed materially (score, affected products, status or references).
References
Patches and release notes
- git.kernel.org/stable/c/24cea9677025e0de419989ecb692acd4bb34cac2
- git.kernel.org/stable/c/333b5085522cf1898d5a0d92616046b414f631a7
- git.kernel.org/stable/c/46c4481938e2ca62343b16ea83ab28f4c1733d31
- git.kernel.org/stable/c/4e8447a9a3d367b5065a0b7abe101da6e0037b6e
- git.kernel.org/stable/c/d2c9eb19fc3b11caebafde4c30a76a49203d18a6
- git.kernel.org/stable/c/f4e14695fe805eb0f0cb36e0ad6a560b9f985e86
- git.kernel.org/stable/c/f7e3c88cc2a977c2b9a8aa52c1ce689e7b394e49
Third-party and government advisories
- lists.debian.org/debian-lts-announce/2024/06/msg00017.htmlMailing List, Third Party Advisory
Other references
Recent Concurrent Execution using Shared Resource with Improper Synchronization vulnerabilities
- 7.0 High severity
- 7.0 High severity
- 8.1 High severity
- 7.0 High severity
- 7.8 High severity
- 7.8 High severity
Spotted an error? Tell us.