ghsa-vcqr-h4qj-jv8g
Vulnerability from github
In the Linux kernel, the following vulnerability has been resolved:
drbd: Fix five use after free bugs in get_initial_state
In get_initial_state, it calls notify_initial_state_done(skb,..) if cb->args[5]==1. If genlmsg_put() failed in notify_initial_state_done(), the skb will be freed by nlmsg_free(skb). Then get_initial_state will goto out and the freed skb will be used by return value skb->len, which is a uaf bug.
What's worse, the same problem goes even further: skb can also be freed in the notify_state_change -> notify_state calls below. Thus 4 additional uaf bugs happened.
My patch lets the problem callee functions: notify_initial_state_done and notify_*_state_change return an error code if errors happen. So that the error codes could be propagated and the uaf bugs can be avoid.
v2 reports a compilation warning. This v3 fixed this warning and built successfully in my local environment with no additional warnings. v2: https://lore.kernel.org/patchwork/patch/1435218/
{ "affected": [], "aliases": [ "CVE-2022-49085" ], "database_specific": { "cwe_ids": [ "CWE-416" ], "github_reviewed": false, "github_reviewed_at": null, "nvd_published_at": "2025-02-26T07:00:45Z", "severity": "HIGH" }, "details": "In the Linux kernel, the following vulnerability has been resolved:\n\ndrbd: Fix five use after free bugs in get_initial_state\n\nIn get_initial_state, it calls notify_initial_state_done(skb,..) if\ncb-\u003eargs[5]==1. If genlmsg_put() failed in notify_initial_state_done(),\nthe skb will be freed by nlmsg_free(skb).\nThen get_initial_state will goto out and the freed skb will be used by\nreturn value skb-\u003elen, which is a uaf bug.\n\nWhat\u0027s worse, the same problem goes even further: skb can also be\nfreed in the notify_*_state_change -\u003e notify_*_state calls below.\nThus 4 additional uaf bugs happened.\n\nMy patch lets the problem callee functions: notify_initial_state_done\nand notify_*_state_change return an error code if errors happen.\nSo that the error codes could be propagated and the uaf bugs can be avoid.\n\nv2 reports a compilation warning. This v3 fixed this warning and built\nsuccessfully in my local environment with no additional warnings.\nv2: https://lore.kernel.org/patchwork/patch/1435218/", "id": "GHSA-vcqr-h4qj-jv8g", "modified": "2025-02-27T18:31:08Z", "published": "2025-02-27T18:31:08Z", "references": [ { "type": "ADVISORY", "url": "https://nvd.nist.gov/vuln/detail/CVE-2022-49085" }, { "type": "WEB", "url": "https://git.kernel.org/stable/c/0489700bfeb1e53eb2039c2291c67e71b0b40103" }, { "type": "WEB", "url": "https://git.kernel.org/stable/c/188fe6b26765edbad4055611c0f788b6870f4024" }, { "type": "WEB", "url": "https://git.kernel.org/stable/c/226e993c39405292781bfcf4b039a8db56aab362" }, { "type": "WEB", "url": "https://git.kernel.org/stable/c/594205b4936771a250f9d141e7e0fff21c3dd2d9" }, { "type": "WEB", "url": "https://git.kernel.org/stable/c/a972c768723359ec995579902473028fe3cd64b1" }, { "type": "WEB", "url": "https://git.kernel.org/stable/c/aadb22ba2f656581b2f733deb3a467c48cc618f6" }, { "type": "WEB", "url": "https://git.kernel.org/stable/c/b6a4055036eed1f5e239ce3d8b0db1ce38bba447" }, { "type": "WEB", "url": "https://git.kernel.org/stable/c/dcf6be17b5c53b741898d2223b23e66d682de300" }, { "type": "WEB", "url": "https://git.kernel.org/stable/c/de63e74da2333b4068bb79983e632db730fea97e" } ], "schema_version": "1.4.0", "severity": [ { "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H", "type": "CVSS_V3" } ] }
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.