In the Linux kernel, the following vulnerability has been resolved: quota: Fix race of dquot_scan_active() with quota deactivation dquot_scan_active() can race with quota deactivation in quota_release_workfn() like: CPU0 (quota_release_workfn) CPU1 (dquot_scan_active) ============================== ============================== spin_lock(&dq_list_lock); list_replace_init( &releasing_dquots, &rls_head); /* dquot X on rls_head, dq_count == 0, DQ_ACTIVE_B still set */ spin_unlock(&dq_list_lock); synchronize_srcu(&dquot_srcu); spin_lock(&dq_list_lock); list_for_each_entry(dquot, &inuse_list, dq_inuse) { /* finds dquot X */ dquot_active(X) -> true atomic_inc(&X->dq_count); } spin_unlock(&dq_list_lock); spin_lock(&dq_list_lock); dquot = list_first_entry(&rls_head); WARN_ON_ONCE(atomic_read(&dquot->dq_count)); The problem is not only a cosmetic one as under memory pressure the caller of dquot_scan_active() can end up working on freed dquot. Fix the problem by making sure the dquot is removed from releasing list when we acquire a reference to it.
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
| Attack Vector | LOCAL |
|---|---|
| Attack Complexity | LOW |
| Privileges Required | LOW |
| User Interaction | NONE |
| Scope | UNCHANGED |
| Confidentiality Impact | HIGH |
| Integrity Impact | HIGH |
| Availability Impact | HIGH |
Source: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
Type: Secondary
Exploitability Score: 1.8
Impact Score: 5.9
| Source | Type | Description |
|---|---|---|
| [email protected] | Primary |
en
CWE-362
|
| Vendor | Product | Version | Update | Type |
|---|---|---|---|---|
| linux | linux_kernel | * | <built-in method update of dict object at 0x7d2364d691c0> | Operating System |
| linux | linux_kernel | * | <built-in method update of dict object at 0x7d24245b9380> | Operating System |
| linux | linux_kernel | * | <built-in method update of dict object at 0x7d24245bb440> | Operating System |
| linux | linux_kernel | * | <built-in method update of dict object at 0x7d23be9fef00> | Operating System |
| linux | linux_kernel | * | <built-in method update of dict object at 0x7d2364d68140> | Operating System |
| linux | linux_kernel | * | <built-in method update of dict object at 0x7d242450bf40> | Operating System |
| linux | linux_kernel | * | <built-in method update of dict object at 0x7d24245b8b80> | Operating System |
| linux | linux_kernel | * | <built-in method update of dict object at 0x7d24245b8500> | Operating System |
| linux | linux_kernel | * | <built-in method update of dict object at 0x7d2364d68340> | Operating System |
| linux | linux_kernel | * | <built-in method update of dict object at 0x7d2364d6bb80> | Operating System |
| linux | linux_kernel | 6.6 | <built-in method update of dict object at 0x7d2364d6bc80> | Operating System |
| linux | linux_kernel | 6.6 | <built-in method update of dict object at 0x7d2364d693c0> | Operating System |
| linux | linux_kernel | 6.6 | <built-in method update of dict object at 0x7d24246e4400> | Operating System |
| Vulnerable | CPE |
|---|---|
| Yes | cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* |
| Yes | cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* |
| Yes | cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* |
| Yes | cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* |
| Yes | cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* |
| Yes | cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* |
| Yes | cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* |
| Yes | cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* |
| Yes | cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* |
| Yes | cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* |
| Yes | cpe:2.3:o:linux:linux_kernel:6.6:-:*:*:*:*:*:* |
| Yes | cpe:2.3:o:linux:linux_kernel:6.6:rc6:*:*:*:*:*:* |
| Yes | cpe:2.3:o:linux:linux_kernel:6.6:rc7:*:*:*:*:*:* |