{"id":"CVE-2022-48740","summary":"selinux: fix double free of cond_list on error paths","details":"In the Linux kernel, the following vulnerability has been resolved:\n\nselinux: fix double free of cond_list on error paths\n\nOn error path from cond_read_list() and duplicate_policydb_cond_list()\nthe cond_list_destroy() gets called a second time in caller functions,\nresulting in NULL pointer deref.  Fix this by resetting the\ncond_list_len to 0 in cond_list_destroy(), making subsequent calls a\nnoop.\n\nAlso consistently reset the cond_list pointer to NULL after freeing.\n\n[PM: fix line lengths in the description]","modified":"2026-04-11T12:41:17.486689Z","published":"2024-06-20T11:13:25.346Z","related":["SUSE-SU-2024:2360-1","SUSE-SU-2024:2372-1","SUSE-SU-2024:2381-1","SUSE-SU-2024:2394-1","SUSE-SU-2024:2561-1","SUSE-SU-2024:2902-1","SUSE-SU-2024:2929-1","SUSE-SU-2024:2939-1"],"database_specific":{"osv_generated_from":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/48xxx/CVE-2022-48740.json","cna_assigner":"Linux"},"references":[{"type":"WEB","url":"https://git.kernel.org/stable/c/186edf7e368c40d06cf727a1ad14698ea67b74ad"},{"type":"WEB","url":"https://git.kernel.org/stable/c/70caa32e6d81f45f0702070c0e4dfe945e92fbd7"},{"type":"WEB","url":"https://git.kernel.org/stable/c/7ed9cbf7ac0d4ed86b356e1b944304ae9ee450d4"},{"type":"WEB","url":"https://git.kernel.org/stable/c/f446089a268c8fc6908488e991d28a9b936293db"},{"type":"ADVISORY","url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/48xxx/CVE-2022-48740.json"},{"type":"ADVISORY","url":"https://nvd.nist.gov/vuln/detail/CVE-2022-48740"},{"type":"PACKAGE","url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"}],"affected":[{"ranges":[{"type":"GIT","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","events":[{"introduced":"60abd3181db29ea81742106cc0ac2e27fd05b418"},{"fixed":"f446089a268c8fc6908488e991d28a9b936293db"},{"fixed":"70caa32e6d81f45f0702070c0e4dfe945e92fbd7"},{"fixed":"7ed9cbf7ac0d4ed86b356e1b944304ae9ee450d4"},{"fixed":"186edf7e368c40d06cf727a1ad14698ea67b74ad"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-48740.json"}},{"package":{"name":"Kernel","ecosystem":"Linux"},"ranges":[{"type":"ECOSYSTEM","events":[{"introduced":"5.7.0"},{"fixed":"5.10.99"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.11.0"},{"fixed":"5.15.22"}]},{"type":"ECOSYSTEM","events":[{"introduced":"5.16.0"},{"fixed":"5.16.8"}]}],"database_specific":{"source":"https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2022-48740.json"}}],"schema_version":"1.7.5"}