{"id":"CVE-2022-49345","aliases":["CVE-2022-49345"],"related":[],"kind":"vulnerability","state":"published","title":"net: xfrm: unexport __init-annotated xfrm4_protocol_init()","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet: xfrm: unexport __init-annotated xfrm4_protocol_init()\n\nEXPORT_SYMBOL and __init is a bad combination because the .init.text\nsection is freed up after the initialization. Hence, modules cannot\nuse symbols annotated __init. The access to a freed symbol may end up\nwith kernel panic.\n\nmodpost used to detect it, but it has been broken for a decade.\n\nRecently, I fixed modpost so it started to warn it again, then this\nshowed up in linux-next builds.\n\nThere are two ways to fix it:\n\n  - Remove __init\n  - Remove EXPORT_SYMBOL\n\nI chose the latter for this case because the only in-tree call-site,\nnet/ipv4/xfrm4_policy.c is never compiled as modular.\n(CONFIG_XFRM is boolean)","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nnet: xfrm: unexport __init-annotated xfrm4_protocol_init()\n\nEXPORT_SYMBOL and __init is a bad combination because the .init.text\nsection is freed up after the initialization. Hence, modules cannot\nuse symbols annotated __init. The access to a freed symbol may end up\nwith kernel panic.\n\nmodpost used to detect it, but it has been broken for a decade.\n\nRecently, I fixed modpost so it started to warn it again, then this\nshowed up in linux-next builds.\n\nThere are two ways to fix it:\n\n  - Remove __init\n  - Remove EXPORT_SYMBOL\n\nI chose the latter for this case because the only in-tree call-site,\nnet/ipv4/xfrm4_policy.c is never compiled as modular.\n(CONFIG_XFRM is boolean)","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: net: xfrm: unexport __init-annotated xfrm4_protocol_init() EXPORT_SYMBOL y __init es una mala combinación porque la sección .init.text se libera después de la inicialización. Por lo tanto, los módulos no pueden usar símbolos anotados __init. El acceso a un símbolo liberado puede terminar con un pánico del kernel. modpost solía detectarlo, pero ha estado roto durante una década. Recientemente, arreglé modpost para que comenzara a advertirlo nuevamente, luego apareció en las compilaciones de linux-next. Hay dos formas de solucionarlo: - Eliminar __init - Eliminar EXPORT_SYMBOL Elegí la última para este caso porque el único sitio de llamada en el árbol, net/ipv4/xfrm4_policy.c nunca se compila como modular. (CONFIG_XFRM es booleano)","source":"nvd"}],"published":"2025-02-26T02:11:00.976Z","modified":"2026-06-17T05:17:46.783Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H","score":5.5,"rating":"MEDIUM"}],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"2f32b51b609faea1e40bb8c5bd305f1351740936","fixed":"c58d82a1264813e69119c13e9804e2e60b664ad5","status":"affected"},{"type":"git","introduced":"2f32b51b609faea1e40bb8c5bd305f1351740936","fixed":"e53cd3814504b2cadaba4d5a8a07eeea9ddacd03","status":"affected"},{"type":"git","introduced":"2f32b51b609faea1e40bb8c5bd305f1351740936","fixed":"31f3c6a4dcd3260a386e62cef2d5b36e902600a1","status":"affected"},{"type":"git","introduced":"2f32b51b609faea1e40bb8c5bd305f1351740936","fixed":"ef6d2354de238b065d8799c80da4be9a6af18e39","status":"affected"},{"type":"git","introduced":"2f32b51b609faea1e40bb8c5bd305f1351740936","fixed":"be3884d5cd04ccd58294b83a02d70b7c5fca19d3","status":"affected"},{"type":"git","introduced":"2f32b51b609faea1e40bb8c5bd305f1351740936","fixed":"85a055c03691e51499123194a14a0c249cf33227","status":"affected"},{"type":"git","introduced":"2f32b51b609faea1e40bb8c5bd305f1351740936","fixed":"e04d59cfe0c0129df7aba7ef7bb17b96be2a64f2","status":"affected"},{"type":"git","introduced":"2f32b51b609faea1e40bb8c5bd305f1351740936","fixed":"2b253fbc9f7b5db18d716436bdcf8ecef09fd63d","status":"affected"},{"type":"git","introduced":"2f32b51b609faea1e40bb8c5bd305f1351740936","fixed":"4a388f08d8784af48f352193d2b72aaf167a57a1","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"3.15","status":"affected"},{"type":"semver","introduced":"0","fixed":"3.15","status":"unaffected"},{"type":"semver","introduced":"4.9.318","lastAffected":"4.9.*","status":"unaffected"},{"type":"semver","introduced":"4.14.283","lastAffected":"4.14.*","status":"unaffected"},{"type":"semver","introduced":"4.19.247","lastAffected":"4.19.*","status":"unaffected"},{"type":"semver","introduced":"5.4.198","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.122","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.47","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"5.17.15","lastAffected":"5.17.*","status":"unaffected"},{"type":"semver","introduced":"5.18.4","lastAffected":"5.18.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"5.19","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":"3.15","fixed":"4.9.318"},{"status":"affected","introduced":"4.10","fixed":"4.14.283"},{"status":"affected","introduced":"4.15","fixed":"4.19.247"},{"status":"affected","introduced":"4.20","fixed":"5.4.198"},{"status":"affected","introduced":"5.5","fixed":"5.10.122"},{"status":"affected","introduced":"5.11","fixed":"5.15.47"},{"status":"affected","introduced":"5.16","fixed":"5.17.15"},{"status":"affected","introduced":"5.18","fixed":"5.18.4"},{"status":"affected","version":"5.19"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/c58d82a1264813e69119c13e9804e2e60b664ad5","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e53cd3814504b2cadaba4d5a8a07eeea9ddacd03","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/31f3c6a4dcd3260a386e62cef2d5b36e902600a1","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/ef6d2354de238b065d8799c80da4be9a6af18e39","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/be3884d5cd04ccd58294b83a02d70b7c5fca19d3","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/85a055c03691e51499123194a14a0c249cf33227","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e04d59cfe0c0129df7aba7ef7bb17b96be2a64f2","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/2b253fbc9f7b5db18d716436bdcf8ecef09fd63d","tags":["patch"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/4a388f08d8784af48f352193d2b72aaf167a57a1","tags":["patch"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2022-49345","url":"https://www.cve.org/CVERecord?id=CVE-2022-49345","licence":"CVE Terms of Use","modified":"2026-05-11T18:57:54.195Z"},{"source":"nvd","name":"NVD","id":"CVE-2022-49345","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-49345","licence":"Public domain","modified":"2026-06-17T05:17:46.783Z"}],"updatedAt":"2026-11-25T22:58:20.433Z","epss":{"score":0.00293,"percentile":0.23599,"date":"2026-12-01T12:00:22.000Z"}}