ghsa-qvf9-958h-6h8p
Vulnerability from github
Published
2024-10-21 15:32
Modified
2024-10-22 18:32
Details

In the Linux kernel, the following vulnerability has been resolved:

bpf: correctly handle malformed BPF_CORE_TYPE_ID_LOCAL relos

In case of malformed relocation record of kind BPF_CORE_TYPE_ID_LOCAL referencing a non-existing BTF type, function bpf_core_calc_relo_insn would cause a null pointer deference.

Fix this by adding a proper check upper in call stack, as malformed relocation records could be passed from user space.

Simplest reproducer is a program:

r0 = 0
exit

With a single relocation record:

.insn_off = 0,          /* patch first instruction */
.type_id = 100500,      /* this type id does not exist */
.access_str_off = 6,    /* offset of string "0" */
.kind = BPF_CORE_TYPE_ID_LOCAL,

See the link for original reproducer or next commit for a test case.

Show details on source website


{
  "affected": [],
  "aliases": [
    "CVE-2024-49850"
  ],
  "database_specific": {
    "cwe_ids": [
      "CWE-476"
    ],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2024-10-21T13:15:05Z",
    "severity": "MODERATE"
  },
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nbpf: correctly handle malformed BPF_CORE_TYPE_ID_LOCAL relos\n\nIn case of malformed relocation record of kind BPF_CORE_TYPE_ID_LOCAL\nreferencing a non-existing BTF type, function bpf_core_calc_relo_insn\nwould cause a null pointer deference.\n\nFix this by adding a proper check upper in call stack, as malformed\nrelocation records could be passed from user space.\n\nSimplest reproducer is a program:\n\n    r0 = 0\n    exit\n\nWith a single relocation record:\n\n    .insn_off = 0,          /* patch first instruction */\n    .type_id = 100500,      /* this type id does not exist */\n    .access_str_off = 6,    /* offset of string \"0\" */\n    .kind = BPF_CORE_TYPE_ID_LOCAL,\n\nSee the link for original reproducer or next commit for a test case.",
  "id": "GHSA-qvf9-958h-6h8p",
  "modified": "2024-10-22T18:32:10Z",
  "published": "2024-10-21T15:32:27Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2024-49850"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/2288b54b96dcb55bedebcef3572bb8821fc5e708"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/3d2786d65aaa954ebd3fcc033ada433e10da21c4"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/584cd3ff792e1edbea20b2a7df55897159b0be3e"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/dc7ce14f00bcd50641f2110b7a32aa6552e0780f"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/e7e9c5b2dda29067332df2a85b0141a92b41f218"
    }
  ],
  "schema_version": "1.4.0",
  "severity": [
    {
      "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H",
      "type": "CVSS_V3"
    }
  ]
}


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.