cve-2024-53160
Vulnerability from cvelistv5
Published
2024-12-24 11:29
Modified
2025-01-20 06:20
Severity ?
Summary
In the Linux kernel, the following vulnerability has been resolved: rcu/kvfree: Fix data-race in __mod_timer / kvfree_call_rcu KCSAN reports a data race when access the krcp->monitor_work.timer.expires variable in the schedule_delayed_monitor_work() function: <snip> BUG: KCSAN: data-race in __mod_timer / kvfree_call_rcu read to 0xffff888237d1cce8 of 8 bytes by task 10149 on cpu 1: schedule_delayed_monitor_work kernel/rcu/tree.c:3520 [inline] kvfree_call_rcu+0x3b8/0x510 kernel/rcu/tree.c:3839 trie_update_elem+0x47c/0x620 kernel/bpf/lpm_trie.c:441 bpf_map_update_value+0x324/0x350 kernel/bpf/syscall.c:203 generic_map_update_batch+0x401/0x520 kernel/bpf/syscall.c:1849 bpf_map_do_batch+0x28c/0x3f0 kernel/bpf/syscall.c:5143 __sys_bpf+0x2e5/0x7a0 __do_sys_bpf kernel/bpf/syscall.c:5741 [inline] __se_sys_bpf kernel/bpf/syscall.c:5739 [inline] __x64_sys_bpf+0x43/0x50 kernel/bpf/syscall.c:5739 x64_sys_call+0x2625/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:322 do_syscall_x64 arch/x86/entry/common.c:52 [inline] do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83 entry_SYSCALL_64_after_hwframe+0x77/0x7f write to 0xffff888237d1cce8 of 8 bytes by task 56 on cpu 0: __mod_timer+0x578/0x7f0 kernel/time/timer.c:1173 add_timer_global+0x51/0x70 kernel/time/timer.c:1330 __queue_delayed_work+0x127/0x1a0 kernel/workqueue.c:2523 queue_delayed_work_on+0xdf/0x190 kernel/workqueue.c:2552 queue_delayed_work include/linux/workqueue.h:677 [inline] schedule_delayed_monitor_work kernel/rcu/tree.c:3525 [inline] kfree_rcu_monitor+0x5e8/0x660 kernel/rcu/tree.c:3643 process_one_work kernel/workqueue.c:3229 [inline] process_scheduled_works+0x483/0x9a0 kernel/workqueue.c:3310 worker_thread+0x51d/0x6f0 kernel/workqueue.c:3391 kthread+0x1d1/0x210 kernel/kthread.c:389 ret_from_fork+0x4b/0x60 arch/x86/kernel/process.c:147 ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244 Reported by Kernel Concurrency Sanitizer on: CPU: 0 UID: 0 PID: 56 Comm: kworker/u8:4 Not tainted 6.12.0-rc2-syzkaller-00050-g5b7c893ed5ed #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024 Workqueue: events_unbound kfree_rcu_monitor <snip> kfree_rcu_monitor() rearms the work if a "krcp" has to be still offloaded and this is done without holding krcp->lock, whereas the kvfree_call_rcu() holds it. Fix it by acquiring the "krcp->lock" for kfree_rcu_monitor() so both functions do not race anymore.
Impacted products
Vendor Product Version
Linux Linux Version: 8fc5494ad5face62747a3937db66b00db1e5d80b
Version: 8fc5494ad5face62747a3937db66b00db1e5d80b
Version: 8fc5494ad5face62747a3937db66b00db1e5d80b
Version: 8fc5494ad5face62747a3937db66b00db1e5d80b
Create a notification for this product.
   Linux Linux Version: 6.3
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "kernel/rcu/tree.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "967a0e61910825d1fad009d836a6cb41f7402395",
              "status": "affected",
              "version": "8fc5494ad5face62747a3937db66b00db1e5d80b",
              "versionType": "git"
            },
            {
              "lessThan": "05b8ea1f16667f07c8e5843fb4bde3e49d49ead8",
              "status": "affected",
              "version": "8fc5494ad5face62747a3937db66b00db1e5d80b",
              "versionType": "git"
            },
            {
              "lessThan": "5ced426d97ce84299ecfcc7bd8b38f975fd11089",
              "status": "affected",
              "version": "8fc5494ad5face62747a3937db66b00db1e5d80b",
              "versionType": "git"
            },
            {
              "lessThan": "a23da88c6c80e41e0503e0b481a22c9eea63f263",
              "status": "affected",
              "version": "8fc5494ad5face62747a3937db66b00db1e5d80b",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "kernel/rcu/tree.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.3"
            },
            {
              "lessThan": "6.3",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.64",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.11.*",
              "status": "unaffected",
              "version": "6.11.11",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.2",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.13",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nrcu/kvfree: Fix data-race in __mod_timer / kvfree_call_rcu\n\nKCSAN reports a data race when access the krcp-\u003emonitor_work.timer.expires\nvariable in the schedule_delayed_monitor_work() function:\n\n\u003csnip\u003e\nBUG: KCSAN: data-race in __mod_timer / kvfree_call_rcu\n\nread to 0xffff888237d1cce8 of 8 bytes by task 10149 on cpu 1:\n schedule_delayed_monitor_work kernel/rcu/tree.c:3520 [inline]\n kvfree_call_rcu+0x3b8/0x510 kernel/rcu/tree.c:3839\n trie_update_elem+0x47c/0x620 kernel/bpf/lpm_trie.c:441\n bpf_map_update_value+0x324/0x350 kernel/bpf/syscall.c:203\n generic_map_update_batch+0x401/0x520 kernel/bpf/syscall.c:1849\n bpf_map_do_batch+0x28c/0x3f0 kernel/bpf/syscall.c:5143\n __sys_bpf+0x2e5/0x7a0\n __do_sys_bpf kernel/bpf/syscall.c:5741 [inline]\n __se_sys_bpf kernel/bpf/syscall.c:5739 [inline]\n __x64_sys_bpf+0x43/0x50 kernel/bpf/syscall.c:5739\n x64_sys_call+0x2625/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:322\n do_syscall_x64 arch/x86/entry/common.c:52 [inline]\n do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83\n entry_SYSCALL_64_after_hwframe+0x77/0x7f\n\nwrite to 0xffff888237d1cce8 of 8 bytes by task 56 on cpu 0:\n __mod_timer+0x578/0x7f0 kernel/time/timer.c:1173\n add_timer_global+0x51/0x70 kernel/time/timer.c:1330\n __queue_delayed_work+0x127/0x1a0 kernel/workqueue.c:2523\n queue_delayed_work_on+0xdf/0x190 kernel/workqueue.c:2552\n queue_delayed_work include/linux/workqueue.h:677 [inline]\n schedule_delayed_monitor_work kernel/rcu/tree.c:3525 [inline]\n kfree_rcu_monitor+0x5e8/0x660 kernel/rcu/tree.c:3643\n process_one_work kernel/workqueue.c:3229 [inline]\n process_scheduled_works+0x483/0x9a0 kernel/workqueue.c:3310\n worker_thread+0x51d/0x6f0 kernel/workqueue.c:3391\n kthread+0x1d1/0x210 kernel/kthread.c:389\n ret_from_fork+0x4b/0x60 arch/x86/kernel/process.c:147\n ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244\n\nReported by Kernel Concurrency Sanitizer on:\nCPU: 0 UID: 0 PID: 56 Comm: kworker/u8:4 Not tainted 6.12.0-rc2-syzkaller-00050-g5b7c893ed5ed #0\nHardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024\nWorkqueue: events_unbound kfree_rcu_monitor\n\u003csnip\u003e\n\nkfree_rcu_monitor() rearms the work if a \"krcp\" has to be still\noffloaded and this is done without holding krcp-\u003elock, whereas\nthe kvfree_call_rcu() holds it.\n\nFix it by acquiring the \"krcp-\u003elock\" for kfree_rcu_monitor() so\nboth functions do not race anymore."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2025-01-20T06:20:04.058Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/967a0e61910825d1fad009d836a6cb41f7402395"
        },
        {
          "url": "https://git.kernel.org/stable/c/05b8ea1f16667f07c8e5843fb4bde3e49d49ead8"
        },
        {
          "url": "https://git.kernel.org/stable/c/5ced426d97ce84299ecfcc7bd8b38f975fd11089"
        },
        {
          "url": "https://git.kernel.org/stable/c/a23da88c6c80e41e0503e0b481a22c9eea63f263"
        }
      ],
      "title": "rcu/kvfree: Fix data-race in __mod_timer / kvfree_call_rcu",
      "x_generator": {
        "engine": "bippy-5f407fcff5a0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2024-53160",
    "datePublished": "2024-12-24T11:29:00.964Z",
    "dateReserved": "2024-11-19T17:17:25.002Z",
    "dateUpdated": "2025-01-20T06:20:04.058Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "vulnerability-lookup:meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2024-53160\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2024-12-24T12:15:24.340\",\"lastModified\":\"2024-12-24T12:15:24.340\",\"vulnStatus\":\"Received\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nrcu/kvfree: Fix data-race in __mod_timer / kvfree_call_rcu\\n\\nKCSAN reports a data race when access the krcp-\u003emonitor_work.timer.expires\\nvariable in the schedule_delayed_monitor_work() function:\\n\\n\u003csnip\u003e\\nBUG: KCSAN: data-race in __mod_timer / kvfree_call_rcu\\n\\nread to 0xffff888237d1cce8 of 8 bytes by task 10149 on cpu 1:\\n schedule_delayed_monitor_work kernel/rcu/tree.c:3520 [inline]\\n kvfree_call_rcu+0x3b8/0x510 kernel/rcu/tree.c:3839\\n trie_update_elem+0x47c/0x620 kernel/bpf/lpm_trie.c:441\\n bpf_map_update_value+0x324/0x350 kernel/bpf/syscall.c:203\\n generic_map_update_batch+0x401/0x520 kernel/bpf/syscall.c:1849\\n bpf_map_do_batch+0x28c/0x3f0 kernel/bpf/syscall.c:5143\\n __sys_bpf+0x2e5/0x7a0\\n __do_sys_bpf kernel/bpf/syscall.c:5741 [inline]\\n __se_sys_bpf kernel/bpf/syscall.c:5739 [inline]\\n __x64_sys_bpf+0x43/0x50 kernel/bpf/syscall.c:5739\\n x64_sys_call+0x2625/0x2d60 arch/x86/include/generated/asm/syscalls_64.h:322\\n do_syscall_x64 arch/x86/entry/common.c:52 [inline]\\n do_syscall_64+0xc9/0x1c0 arch/x86/entry/common.c:83\\n entry_SYSCALL_64_after_hwframe+0x77/0x7f\\n\\nwrite to 0xffff888237d1cce8 of 8 bytes by task 56 on cpu 0:\\n __mod_timer+0x578/0x7f0 kernel/time/timer.c:1173\\n add_timer_global+0x51/0x70 kernel/time/timer.c:1330\\n __queue_delayed_work+0x127/0x1a0 kernel/workqueue.c:2523\\n queue_delayed_work_on+0xdf/0x190 kernel/workqueue.c:2552\\n queue_delayed_work include/linux/workqueue.h:677 [inline]\\n schedule_delayed_monitor_work kernel/rcu/tree.c:3525 [inline]\\n kfree_rcu_monitor+0x5e8/0x660 kernel/rcu/tree.c:3643\\n process_one_work kernel/workqueue.c:3229 [inline]\\n process_scheduled_works+0x483/0x9a0 kernel/workqueue.c:3310\\n worker_thread+0x51d/0x6f0 kernel/workqueue.c:3391\\n kthread+0x1d1/0x210 kernel/kthread.c:389\\n ret_from_fork+0x4b/0x60 arch/x86/kernel/process.c:147\\n ret_from_fork_asm+0x1a/0x30 arch/x86/entry/entry_64.S:244\\n\\nReported by Kernel Concurrency Sanitizer on:\\nCPU: 0 UID: 0 PID: 56 Comm: kworker/u8:4 Not tainted 6.12.0-rc2-syzkaller-00050-g5b7c893ed5ed #0\\nHardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 09/13/2024\\nWorkqueue: events_unbound kfree_rcu_monitor\\n\u003csnip\u003e\\n\\nkfree_rcu_monitor() rearms the work if a \\\"krcp\\\" has to be still\\noffloaded and this is done without holding krcp-\u003elock, whereas\\nthe kvfree_call_rcu() holds it.\\n\\nFix it by acquiring the \\\"krcp-\u003elock\\\" for kfree_rcu_monitor() so\\nboth functions do not race anymore.\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/05b8ea1f16667f07c8e5843fb4bde3e49d49ead8\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/5ced426d97ce84299ecfcc7bd8b38f975fd11089\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/967a0e61910825d1fad009d836a6cb41f7402395\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/a23da88c6c80e41e0503e0b481a22c9eea63f263\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}"
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.