Release Date: | 2024-07-12 |
In the Linux kernel, the following vulnerability has been resolved:\nima: Avoid blocking in RCU read-side critical section\nA panic happens in ima_match_policy:\nBUG: unable to handle kernel NULL pointer dereference at 0000000000000010\nPGD 42f873067 P4D 0\nOops: 0000 [#1] SMP NOPTI\nCPU: 5 PID: 1286325 Comm: kubeletmonit.sh\nKdump: loaded Tainted: P\nHardware name: QEMU Standard PC (i440FX + PIIX, 1996),\nBIOS 0.0.0 02/06/2015\nRIP: 0010:ima_match_policy+0x84/0x450\nCode: 49 89 fc 41 89 cf 31 ed 89 44 24 14 eb 1c 44 39\n7b 18 74 26 41 83 ff 05 74 20 48 8b 1b 48 3b 1d\nf2 b9 f4 00 0f 84 9c 01 00 00 <44> 85 73 10 74 ea\n44 8b 6b 14 41 f6 c5 01 75 d4 41 f6 c5 02 74 0f\nRSP: 0018:ff71570009e07a80 EFLAGS: 00010207\nRAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000200\nRDX: ffffffffad8dc7c0 RSI: 0000000024924925 RDI: ff3e27850dea2000\nRBP: 0000000000000000 R08: 0000000000000000 R09: ffffffffabfce739\nR10: ff3e27810cc42400 R11: 0000000000000000 R12: ff3e2781825ef970\nR13: 00000000ff3e2785 R14: 000000000000000c R15: 0000000000000001\nFS: 00007f5195b51740(0000)\nGS:ff3e278b12d40000(0000) knlGS:0000000000000000\nCS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033\nCR2: 0000000000000010 CR3: 0000000626d24002 CR4: 0000000000361ee0\nDR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000\nDR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400\nCall Trace:\nima_get_action+0x22/0x30\nprocess_measurement+0xb0/0x830\n? page_add_file_rmap+0x15/0x170\n? alloc_set_pte+0x269/0x4c0\n? prep_new_page+0x81/0x140\n? simple_xattr_get+0x75/0xa0\n? selinux_file_open+0x9d/0xf0\nima_file_check+0x64/0x90\npath_openat+0x571/0x1720\ndo_filp_open+0x9b/0x110\n? page_counter_try_charge+0x57/0xc0\n? files_cgroup_alloc_fd+0x38/0x60\n? __alloc_fd+0xd4/0x250\n? do_sys_open+0x1bd/0x250\ndo_sys_open+0x1bd/0x250\ndo_syscall_64+0x5d/0x1d0\nentry_SYSCALL_64_after_hwframe+0x65/0xca\nCommit c7423dbdbc9e ('ima: Handle -ESTALE returned by\nima_filter_rule_match()') introduced call to ima_lsm_copy_rule within a\nRCU read-side critical section which contains kmalloc with GFP_KERNEL.\nThis implies a possible sleep and violates limitations of RCU read-side\ncritical sections on non-PREEMPT systems.\nSleeping within RCU read-side critical section might cause\nsynchronize_rcu() returning early and break RCU protection, allowing a\nUAF to happen.\nThe root cause of this issue could be described as follows:\n|Thread A|Thread B|\n||ima_match_policy|\n|| rcu_read_lock|\n|ima_lsm_update_rule||\n| synchronize_rcu||\n|| kmalloc(GFP_KERNEL)|\n|| sleep|\n==> synchronize_rcu returns early\n| kfree(entry)||\n|| entry = entry->next|\n==> UAF happens and entry now becomes NULL (or could be anything).\n|| entry->action|\n==> Accessing entry might cause panic.\nTo fix this issue, we are converting all kmalloc that is called within\nRCU read-side critical section to use GFP_ATOMIC.\n[PM: fixed missing comment, long lines, !CONFIG_IMA_LSM_RULES case]
See more information about CVE-2024-40947 from MITRE CVE dictionary and NIST NVD
NOTE: The following CVSS v3.1 metrics and score provided are preliminary and subject to review.
Base Score: | 4.1 | CVSS Vector: | CVSS:3.1/AV:L/AC:H/PR:H/UI:N/S:U/C:N/I:N/A:H |
Attack Vector: | Local network | Attack Complexity: | High |
Privileges Required: | High | User Interaction: | None |
Scope: | Unchanged | Confidentiality Impact: | None |
Integrity Impact: | None | Availability Impact: | High |
Platform | Errata | Release Date |
Oracle Linux version 8 (kernel-uek) | ELSA-2024-12618 | 2024-09-12 |
Oracle Linux version 9 (kernel-uek) | ELSA-2024-12618 | 2024-09-12 |
This page is generated automatically and has not been checked for errors or omissions. For clarification or corrections: