CVE-2024-46823 (GCVE-0-2024-46823)
Vulnerability from cvelistv5
Published
2024-09-27 12:39
Modified
2026-08-05 11:38
Summary
In the Linux kernel, the following vulnerability has been resolved: kunit/overflow: Fix UB in overflow_allocation_test The 'device_name' array doesn't exist out of the 'overflow_allocation_test' function scope. However, it is being used as a driver name when calling 'kunit_driver_create' from 'kunit_device_register'. It produces the kernel panic with KASAN enabled. Since this variable is used in one place only, remove it and pass the device name into kunit_device_register directly as an ascii string.
Impacted products
Vendor Product Version
Linux Linux Version: d03c720e03bd9bf0b784d80b5d3ede7e2daf3b6e
Version: d03c720e03bd9bf0b784d80b5d3ede7e2daf3b6e
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2024-46823",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-09-29T14:13:28.123233Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-09-29T14:13:37.295Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      },
      {
        "providerMetadata": {
          "dateUpdated": "2025-11-03T19:31:15.228Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "url": "https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html"
          }
        ],
        "title": "CVE Program Container"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "lib/overflow_kunit.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "d1207f07decc66546a7fa463d2f335a856c986ef",
              "status": "affected",
              "version": "d03c720e03bd9bf0b784d80b5d3ede7e2daf3b6e",
              "versionType": "git"
            },
            {
              "lessThan": "92e9bac18124682c4b99ede9ee3bcdd68f121e92",
              "status": "affected",
              "version": "d03c720e03bd9bf0b784d80b5d3ede7e2daf3b6e",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "lib/overflow_kunit.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.8"
            },
            {
              "lessThan": "6.8",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.10.*",
              "status": "unaffected",
              "version": "6.10.10",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.11",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.10.10",
                  "versionStartIncluding": "6.8",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.11",
                  "versionStartIncluding": "6.8",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nkunit/overflow: Fix UB in overflow_allocation_test\n\nThe \u0027device_name\u0027 array doesn\u0027t exist out of the\n\u0027overflow_allocation_test\u0027 function scope. However, it is being used as\na driver name when calling \u0027kunit_driver_create\u0027 from\n\u0027kunit_device_register\u0027. It produces the kernel panic with KASAN\nenabled.\n\nSince this variable is used in one place only, remove it and pass the\ndevice name into kunit_device_register directly as an ascii string."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 8.4,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:L - The vulnerable code is the in-kernel `overflow` KUnit suite, reached only during kernel/module initialization or through a local write to `/sys/kernel/debug/kunit/overflow/run`. No remote peer data or network protocol reaches `overflow_allocation_test()`.\nAC:L - The dangling stack pointer is stored unconditionally and dereferenced on every single execution of the test suite \u2014 there is no race to win, no allocation failure to induce, and no memory-layout precondition for triggering the use-after-free itself. `kthread` teardown between the test body and the cleanup thread guarantees the stack is already freed at dereference time.\nPR:N - On a kernel built with `CONFIG_OVERFLOW_KUNIT_TEST`, the suite runs automatically during kernel initialization with no authentication, capability check, or credential of any kind gating execution of the vulnerable path. The flaw is reached before any privilege boundary exists.\nUI:N - The test suite executes on its own at boot/module init; the dangling-pointer dereference in `kunit_cleanup()` follows automatically with no action by any user or administrator.\nS:U - The freed-stack read, the resulting oops, and the corrupted sysfs link name all occur inside the kernel\u0027s own security authority; no hypervisor, IOMMU, or sandbox boundary is crossed.\nC:H - `make_driver_name()` runs `kasprintf(\"%s:%s\", ..., drv-\u003ename)` over a freed kernel stack page from an exited kthread, an unbounded read that continues until a NUL byte and can span recycled stack contents of unrelated kernel threads. Those bytes are consumed as a sysfs link name and, with the `bus_remove_driver()` `pr_debug` enabled, emitted into dmesg \u2014 a genuine kernel stack disclosure.\nI:H - This is a use-after-free of a `const char *` whose target contents are entirely determined by whatever reoccupies the freed kthread stack, and the resulting string drives `sysfs_remove_link()` on the module\u0027s `drivers/` kobject directory \u2014 recycled-memory contents directly steer which kernel sysfs object is torn down, and per UAF scoring this class of dangling-pointer defect is treated as a control-influencing corruption primitive.\nA:H - The fix commit explicitly documents that the bug \"produces the kernel panic with KASAN enabled.\" Even without KASAN, `kasprintf()` walking a freed VMAP_STACK page past its end faults on the vmalloc guard page, giving a kernel oops."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-08-05T11:38:50.296Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/d1207f07decc66546a7fa463d2f335a856c986ef"
        },
        {
          "url": "https://git.kernel.org/stable/c/92e9bac18124682c4b99ede9ee3bcdd68f121e92"
        }
      ],
      "title": "kunit/overflow: Fix UB in overflow_allocation_test",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2024-46823",
    "datePublished": "2024-09-27T12:39:23.959Z",
    "dateReserved": "2024-09-11T15:12:18.285Z",
    "dateUpdated": "2026-08-05T11:38:50.296Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "vulnrichment": {
      "containers": "{\"adp\": [{\"title\": \"CVE Program Container\", \"references\": [{\"url\": \"https://lists.debian.org/debian-lts-announce/2025/05/msg00045.html\"}], \"providerMetadata\": {\"orgId\": \"af854a3a-2127-422b-91ae-364da2661108\", \"shortName\": \"CVE\", \"dateUpdated\": \"2025-11-03T19:31:15.228Z\"}}, {\"title\": \"CISA ADP Vulnrichment\", \"metrics\": [{\"other\": {\"type\": \"ssvc\", \"content\": {\"id\": \"CVE-2024-46823\", \"role\": \"CISA Coordinator\", \"options\": [{\"Exploitation\": \"none\"}, {\"Automatable\": \"no\"}, {\"Technical Impact\": \"partial\"}], \"version\": \"2.0.3\", \"timestamp\": \"2024-09-29T14:13:28.123233Z\"}}}], \"providerMetadata\": {\"orgId\": \"134c704f-9b21-4f2e-91b3-4a467353bcc0\", \"shortName\": \"CISA-ADP\", \"dateUpdated\": \"2024-09-29T14:13:29.207Z\"}}], \"cna\": {\"title\": \"kunit/overflow: Fix UB in overflow_allocation_test\", \"affected\": [{\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"d03c720e03bd9bf0b784d80b5d3ede7e2daf3b6e\", \"lessThan\": \"d1207f07decc66546a7fa463d2f335a856c986ef\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"d03c720e03bd9bf0b784d80b5d3ede7e2daf3b6e\", \"lessThan\": \"92e9bac18124682c4b99ede9ee3bcdd68f121e92\", \"versionType\": \"git\"}], \"programFiles\": [\"lib/overflow_kunit.c\"], \"defaultStatus\": \"unaffected\"}, {\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"6.8\"}, {\"status\": \"unaffected\", \"version\": \"0\", \"lessThan\": \"6.8\", \"versionType\": \"semver\"}, {\"status\": \"unaffected\", \"version\": \"6.10.10\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.10.*\"}, {\"status\": \"unaffected\", \"version\": \"6.11\", \"versionType\": \"original_commit_for_fix\", \"lessThanOrEqual\": \"*\"}], \"programFiles\": [\"lib/overflow_kunit.c\"], \"defaultStatus\": \"affected\"}], \"references\": [{\"url\": \"https://git.kernel.org/stable/c/d1207f07decc66546a7fa463d2f335a856c986ef\"}, {\"url\": \"https://git.kernel.org/stable/c/92e9bac18124682c4b99ede9ee3bcdd68f121e92\"}], \"x_generator\": {\"engine\": \"bippy-1.2.0\"}, \"descriptions\": [{\"lang\": \"en\", \"value\": \"In the Linux kernel, the following vulnerability has been resolved:\\n\\nkunit/overflow: Fix UB in overflow_allocation_test\\n\\nThe \u0027device_name\u0027 array doesn\u0027t exist out of the\\n\u0027overflow_allocation_test\u0027 function scope. However, it is being used as\\na driver name when calling \u0027kunit_driver_create\u0027 from\\n\u0027kunit_device_register\u0027. It produces the kernel panic with KASAN\\nenabled.\\n\\nSince this variable is used in one place only, remove it and pass the\\ndevice name into kunit_device_register directly as an ascii string.\"}], \"cpeApplicability\": [{\"nodes\": [{\"negate\": false, \"cpeMatch\": [{\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.10.10\", \"versionStartIncluding\": \"6.8\"}, {\"criteria\": \"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*\", \"vulnerable\": true, \"versionEndExcluding\": \"6.11\", \"versionStartIncluding\": \"6.8\"}], \"operator\": \"OR\"}]}], \"providerMetadata\": {\"orgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"shortName\": \"Linux\", \"dateUpdated\": \"2026-05-11T20:37:14.676Z\"}}}",
      "cveMetadata": "{\"cveId\": \"CVE-2024-46823\", \"state\": \"PUBLISHED\", \"dateUpdated\": \"2026-05-11T20:37:14.676Z\", \"dateReserved\": \"2024-09-11T15:12:18.285Z\", \"assignerOrgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"datePublished\": \"2024-09-27T12:39:23.959Z\", \"assignerShortName\": \"Linux\"}",
      "dataType": "CVE_RECORD",
      "dataVersion": "5.2"
    }
  }
}


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.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • 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.


Loading…

Loading…