{"id":"CVE-2022-49085","aliases":["CVE-2022-49085"],"related":[],"kind":"vulnerability","state":"published","title":"drbd: Fix five use after free bugs in get_initial_state","summary":"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->args[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->len, which is a uaf bug.\n\nWhat's worse, the same problem goes even further: skb can also be\nfreed in the notify_*_state_change -> 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/","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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->args[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->len, which is a uaf bug.\n\nWhat's worse, the same problem goes even further: skb can also be\nfreed in the notify_*_state_change -> 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/","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: drbd: Arregla cinco errores de use-after-free en get_initial_state En get_initial_state, llama a notify_initial_state_done(skb,..) si cb-&gt;args[5]==1. Si genlmsg_put() falló en notify_initial_state_done(), el skb será liberado por nlmsg_free(skb). Entonces get_initial_state saldrá y el skb liberado será utilizado por el valor de retorno skb-&gt;len, que es un error de uaf. Lo que es peor, el mismo problema va aún más allá: skb también se puede liberar en las llamadas notify_*_state_change -&gt; notify_*_state a continuación. Por lo tanto, ocurrieron 4 errores de uaf adicionales. Mi parche permite que las funciones llamadas al problema: notify_initial_state_done y notify_*_state_change devuelvan un código de error si ocurren errores. Para que los códigos de error se puedan propagar y los errores de uaf se puedan evitar, la v2 informa una advertencia de compilación. Esta v3 corrigió esta advertencia y se compiló correctamente en mi entorno local sin advertencias adicionales. v2: https://lore.kernel.org/patchwork/patch/1435218/","source":"nvd"}],"published":"2025-02-26T01:54:43.579Z","modified":"2026-08-05T08:53:48.711Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-416"],"affected":[{"ranges":[{"type":"git","introduced":"a29728463b254ce81ecefdf20c1a02e01d9361da","fixed":"0489700bfeb1e53eb2039c2291c67e71b0b40103","status":"affected"},{"type":"git","introduced":"a29728463b254ce81ecefdf20c1a02e01d9361da","fixed":"dcf6be17b5c53b741898d2223b23e66d682de300","status":"affected"},{"type":"git","introduced":"a29728463b254ce81ecefdf20c1a02e01d9361da","fixed":"188fe6b26765edbad4055611c0f788b6870f4024","status":"affected"},{"type":"git","introduced":"a29728463b254ce81ecefdf20c1a02e01d9361da","fixed":"b6a4055036eed1f5e239ce3d8b0db1ce38bba447","status":"affected"},{"type":"git","introduced":"a29728463b254ce81ecefdf20c1a02e01d9361da","fixed":"594205b4936771a250f9d141e7e0fff21c3dd2d9","status":"affected"},{"type":"git","introduced":"a29728463b254ce81ecefdf20c1a02e01d9361da","fixed":"a972c768723359ec995579902473028fe3cd64b1","status":"affected"},{"type":"git","introduced":"a29728463b254ce81ecefdf20c1a02e01d9361da","fixed":"de63e74da2333b4068bb79983e632db730fea97e","status":"affected"},{"type":"git","introduced":"a29728463b254ce81ecefdf20c1a02e01d9361da","fixed":"226e993c39405292781bfcf4b039a8db56aab362","status":"affected"},{"type":"git","introduced":"a29728463b254ce81ecefdf20c1a02e01d9361da","fixed":"aadb22ba2f656581b2f733deb3a467c48cc618f6","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"4.5","status":"affected"},{"type":"semver","introduced":"0","fixed":"4.5","status":"unaffected"},{"type":"semver","introduced":"4.9.311","lastAffected":"4.9.*","status":"unaffected"},{"type":"semver","introduced":"4.14.276","lastAffected":"4.14.*","status":"unaffected"},{"type":"semver","introduced":"4.19.238","lastAffected":"4.19.*","status":"unaffected"},{"type":"semver","introduced":"5.4.189","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.111","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.34","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"5.16.20","lastAffected":"5.16.*","status":"unaffected"},{"type":"semver","introduced":"5.17.3","lastAffected":"5.17.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"5.18","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"4.5","fixed":"4.9.311"},{"status":"affected","introduced":"4.10","fixed":"4.14.276"},{"status":"affected","introduced":"4.15","fixed":"4.19.238"},{"status":"affected","introduced":"4.20","fixed":"5.4.189"},{"status":"affected","introduced":"5.5","fixed":"5.10.111"},{"status":"affected","introduced":"5.11","fixed":"5.15.34"},{"status":"affected","introduced":"5.16","fixed":"5.16.20"},{"status":"affected","introduced":"5.17","fixed":"5.17.3"},{"status":"affected","version":"5.18"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/0489700bfeb1e53eb2039c2291c67e71b0b40103","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/dcf6be17b5c53b741898d2223b23e66d682de300","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/188fe6b26765edbad4055611c0f788b6870f4024","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/b6a4055036eed1f5e239ce3d8b0db1ce38bba447","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/594205b4936771a250f9d141e7e0fff21c3dd2d9","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/a972c768723359ec995579902473028fe3cd64b1","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/de63e74da2333b4068bb79983e632db730fea97e","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/226e993c39405292781bfcf4b039a8db56aab362","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/aadb22ba2f656581b2f733deb3a467c48cc618f6","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2025-02-27T17:59:12.644Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-49085","url":"https://www.cve.org/CVERecord?id=CVE-2022-49085","licence":"CVE Terms of Use","modified":"2026-08-05T08:53:48.711Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-49085","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-49085","licence":"Public domain","modified":"2026-06-17T05:17:02.263Z"}],"updatedAt":"2026-11-25T22:58:20.160Z","epss":{"score":0.00282,"percentile":0.22215,"date":"2026-12-01T12:00:22.000Z"}}