In the Linux kernel, the following vulnerability has been resolved:
net: genl: fix error path memory leak in policy dumping
If construction of the array of policies fails when recording non-first policy we need to unwind.
netlinkpolicydumpaddpolicy() itself also needs fixing as it currently gives up on error without recording the allocated pointer in the pstate pointer.
{ "vanir_signatures": [ { "deprecated": false, "signature_type": "Function", "target": { "file": "net/netlink/policy.c", "function": "netlink_policy_dump_add_policy" }, "id": "CVE-2022-50042-1c3e2393", "digest": { "length": 754.0, "function_hash": "305556549993886244477461836730331318335" }, "signature_version": "v1", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@249801360db3dec4f73768c502192020bfddeacc" }, { "deprecated": false, "signature_type": "Line", "target": { "file": "net/netlink/genetlink.c" }, "id": "CVE-2022-50042-43b8c113", "digest": { "line_hashes": [ "104405332519522960522439745017264608630", "330827633552781395785645289028442670775", "78828392896317485488953111243907561258", "103894786242483208151408445583131786212", "218173652574822278898408317402945793684", "234369273626214188867881054735990380433", "136840179919294046460941863803174258763", "296268050310514704308426655253464840444", "120842118024458241526956197138102288531" ], "threshold": 0.9 }, "signature_version": "v1", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b0672895d8be5d19d4b05ac83f807026fc791037" }, { "deprecated": false, "signature_type": "Function", "target": { "file": "net/netlink/genetlink.c", "function": "ctrl_dumppolicy_start" }, "id": "CVE-2022-50042-48bd6366", "digest": { "length": 1267.0, "function_hash": "299671361865052203314367329275578245462" }, "signature_version": "v1", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@26b6acd365823e99e46be3b27500f5dc235dda5e" }, { "deprecated": false, "signature_type": "Line", "target": { "file": "net/netlink/policy.c" }, "id": "CVE-2022-50042-52e23fc6", "digest": { "line_hashes": [ "129394455275853235221980196863476590642", "207602487379929423731856322504554247890", "295141010400994329605078787532009737871", "83707521468154069361295857602898231252", "55586657440026488025102591930392608508", "298491033842692856838932624633538255226", "143831625909857302181186419570827105396", "112721398578729193083765879074641731005", "191525638188066204191583534096652753818", "331237305056096458384075482638222034572", "16757891077220897957032267244961969590", "271991315649067351396350487086253146876" ], "threshold": 0.9 }, "signature_version": "v1", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@26b6acd365823e99e46be3b27500f5dc235dda5e" }, { "deprecated": false, "signature_type": "Function", "target": { "file": "net/netlink/policy.c", "function": "netlink_policy_dump_add_policy" }, "id": "CVE-2022-50042-5737bd05", "digest": { "length": 754.0, "function_hash": "305556549993886244477461836730331318335" }, "signature_version": "v1", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@83411c9f05d5a8b637293b3389eca3d378197c04" }, { "deprecated": false, "signature_type": "Function", "target": { "file": "net/netlink/genetlink.c", "function": "ctrl_dumppolicy_start" }, "id": "CVE-2022-50042-699f77a9", "digest": { "length": 1267.0, "function_hash": "299671361865052203314367329275578245462" }, "signature_version": "v1", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@83411c9f05d5a8b637293b3389eca3d378197c04" }, { "deprecated": false, "signature_type": "Function", "target": { "file": "net/netlink/genetlink.c", "function": "ctrl_dumppolicy_start" }, "id": "CVE-2022-50042-6f4ec810", "digest": { "length": 1267.0, "function_hash": "299671361865052203314367329275578245462" }, "signature_version": "v1", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@249801360db3dec4f73768c502192020bfddeacc" }, { "deprecated": false, "signature_type": "Line", "target": { "file": "net/netlink/genetlink.c" }, "id": "CVE-2022-50042-7060222c", "digest": { "line_hashes": [ "104405332519522960522439745017264608630", "330827633552781395785645289028442670775", "78828392896317485488953111243907561258", "103894786242483208151408445583131786212", "218173652574822278898408317402945793684", "234369273626214188867881054735990380433", "136840179919294046460941863803174258763", "296268050310514704308426655253464840444", "120842118024458241526956197138102288531" ], "threshold": 0.9 }, "signature_version": "v1", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@26b6acd365823e99e46be3b27500f5dc235dda5e" }, { "deprecated": false, "signature_type": "Line", "target": { "file": "net/netlink/policy.c" }, "id": "CVE-2022-50042-845f1185", "digest": { "line_hashes": [ "129394455275853235221980196863476590642", "207602487379929423731856322504554247890", "295141010400994329605078787532009737871", "83707521468154069361295857602898231252", "55586657440026488025102591930392608508", "298491033842692856838932624633538255226", "143831625909857302181186419570827105396", "112721398578729193083765879074641731005", "191525638188066204191583534096652753818", "331237305056096458384075482638222034572", "16757891077220897957032267244961969590", "271991315649067351396350487086253146876" ], "threshold": 0.9 }, "signature_version": "v1", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@83411c9f05d5a8b637293b3389eca3d378197c04" }, { "deprecated": false, "signature_type": "Line", "target": { "file": "net/netlink/policy.c" }, "id": "CVE-2022-50042-928796d6", "digest": { "line_hashes": [ "129394455275853235221980196863476590642", "207602487379929423731856322504554247890", "295141010400994329605078787532009737871", "83707521468154069361295857602898231252", "55586657440026488025102591930392608508", "298491033842692856838932624633538255226", "143831625909857302181186419570827105396", "112721398578729193083765879074641731005", "191525638188066204191583534096652753818", "331237305056096458384075482638222034572", "16757891077220897957032267244961969590", "271991315649067351396350487086253146876" ], "threshold": 0.9 }, "signature_version": "v1", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@249801360db3dec4f73768c502192020bfddeacc" }, { "deprecated": false, "signature_type": "Function", "target": { "file": "net/netlink/policy.c", "function": "netlink_policy_dump_add_policy" }, "id": "CVE-2022-50042-a1a41706", "digest": { "length": 754.0, "function_hash": "305556549993886244477461836730331318335" }, "signature_version": "v1", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b0672895d8be5d19d4b05ac83f807026fc791037" }, { "deprecated": false, "signature_type": "Function", "target": { "file": "net/netlink/genetlink.c", "function": "ctrl_dumppolicy_start" }, "id": "CVE-2022-50042-a6169556", "digest": { "length": 1267.0, "function_hash": "299671361865052203314367329275578245462" }, "signature_version": "v1", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b0672895d8be5d19d4b05ac83f807026fc791037" }, { "deprecated": false, "signature_type": "Line", "target": { "file": "net/netlink/genetlink.c" }, "id": "CVE-2022-50042-b8542873", "digest": { "line_hashes": [ "104405332519522960522439745017264608630", "330827633552781395785645289028442670775", "78828392896317485488953111243907561258", "103894786242483208151408445583131786212", "218173652574822278898408317402945793684", "234369273626214188867881054735990380433", "136840179919294046460941863803174258763", "296268050310514704308426655253464840444", "120842118024458241526956197138102288531" ], "threshold": 0.9 }, "signature_version": "v1", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@83411c9f05d5a8b637293b3389eca3d378197c04" }, { "deprecated": false, "signature_type": "Line", "target": { "file": "net/netlink/policy.c" }, "id": "CVE-2022-50042-e66cef86", "digest": { "line_hashes": [ "129394455275853235221980196863476590642", "207602487379929423731856322504554247890", "295141010400994329605078787532009737871", "83707521468154069361295857602898231252", "55586657440026488025102591930392608508", "298491033842692856838932624633538255226", "143831625909857302181186419570827105396", "112721398578729193083765879074641731005", "191525638188066204191583534096652753818", "331237305056096458384075482638222034572", "16757891077220897957032267244961969590", "271991315649067351396350487086253146876" ], "threshold": 0.9 }, "signature_version": "v1", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b0672895d8be5d19d4b05ac83f807026fc791037" }, { "deprecated": false, "signature_type": "Line", "target": { "file": "net/netlink/genetlink.c" }, "id": "CVE-2022-50042-ebf627ab", "digest": { "line_hashes": [ "104405332519522960522439745017264608630", "330827633552781395785645289028442670775", "78828392896317485488953111243907561258", "103894786242483208151408445583131786212", "218173652574822278898408317402945793684", "234369273626214188867881054735990380433", "136840179919294046460941863803174258763", "296268050310514704308426655253464840444", "120842118024458241526956197138102288531" ], "threshold": 0.9 }, "signature_version": "v1", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@249801360db3dec4f73768c502192020bfddeacc" }, { "deprecated": false, "signature_type": "Function", "target": { "file": "net/netlink/policy.c", "function": "netlink_policy_dump_add_policy" }, "id": "CVE-2022-50042-ece02c0c", "digest": { "length": 754.0, "function_hash": "305556549993886244477461836730331318335" }, "signature_version": "v1", "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@26b6acd365823e99e46be3b27500f5dc235dda5e" } ] }