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.
{
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/50xxx/CVE-2022-50042.json"
}"https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2022-50042.json"
[
{
"signature_version": "v1",
"target": {
"file": "net/netlink/policy.c",
"function": "netlink_policy_dump_add_policy"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@249801360db3dec4f73768c502192020bfddeacc",
"deprecated": false,
"digest": {
"function_hash": "305556549993886244477461836730331318335",
"length": 754.0
},
"id": "CVE-2022-50042-1c3e2393",
"signature_type": "Function"
},
{
"signature_version": "v1",
"target": {
"file": "net/netlink/genetlink.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b0672895d8be5d19d4b05ac83f807026fc791037",
"deprecated": false,
"digest": {
"line_hashes": [
"104405332519522960522439745017264608630",
"330827633552781395785645289028442670775",
"78828392896317485488953111243907561258",
"103894786242483208151408445583131786212",
"218173652574822278898408317402945793684",
"234369273626214188867881054735990380433",
"136840179919294046460941863803174258763",
"296268050310514704308426655253464840444",
"120842118024458241526956197138102288531"
],
"threshold": 0.9
},
"id": "CVE-2022-50042-43b8c113",
"signature_type": "Line"
},
{
"signature_version": "v1",
"target": {
"file": "net/netlink/genetlink.c",
"function": "ctrl_dumppolicy_start"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@26b6acd365823e99e46be3b27500f5dc235dda5e",
"deprecated": false,
"digest": {
"function_hash": "299671361865052203314367329275578245462",
"length": 1267.0
},
"id": "CVE-2022-50042-48bd6366",
"signature_type": "Function"
},
{
"signature_version": "v1",
"target": {
"file": "net/netlink/policy.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@26b6acd365823e99e46be3b27500f5dc235dda5e",
"deprecated": false,
"digest": {
"line_hashes": [
"129394455275853235221980196863476590642",
"207602487379929423731856322504554247890",
"295141010400994329605078787532009737871",
"83707521468154069361295857602898231252",
"55586657440026488025102591930392608508",
"298491033842692856838932624633538255226",
"143831625909857302181186419570827105396",
"112721398578729193083765879074641731005",
"191525638188066204191583534096652753818",
"331237305056096458384075482638222034572",
"16757891077220897957032267244961969590",
"271991315649067351396350487086253146876"
],
"threshold": 0.9
},
"id": "CVE-2022-50042-52e23fc6",
"signature_type": "Line"
},
{
"signature_version": "v1",
"target": {
"file": "net/netlink/policy.c",
"function": "netlink_policy_dump_add_policy"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@83411c9f05d5a8b637293b3389eca3d378197c04",
"deprecated": false,
"digest": {
"function_hash": "305556549993886244477461836730331318335",
"length": 754.0
},
"id": "CVE-2022-50042-5737bd05",
"signature_type": "Function"
},
{
"signature_version": "v1",
"target": {
"file": "net/netlink/genetlink.c",
"function": "ctrl_dumppolicy_start"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@83411c9f05d5a8b637293b3389eca3d378197c04",
"deprecated": false,
"digest": {
"function_hash": "299671361865052203314367329275578245462",
"length": 1267.0
},
"id": "CVE-2022-50042-699f77a9",
"signature_type": "Function"
},
{
"signature_version": "v1",
"target": {
"file": "net/netlink/genetlink.c",
"function": "ctrl_dumppolicy_start"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@249801360db3dec4f73768c502192020bfddeacc",
"deprecated": false,
"digest": {
"function_hash": "299671361865052203314367329275578245462",
"length": 1267.0
},
"id": "CVE-2022-50042-6f4ec810",
"signature_type": "Function"
},
{
"signature_version": "v1",
"target": {
"file": "net/netlink/genetlink.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@26b6acd365823e99e46be3b27500f5dc235dda5e",
"deprecated": false,
"digest": {
"line_hashes": [
"104405332519522960522439745017264608630",
"330827633552781395785645289028442670775",
"78828392896317485488953111243907561258",
"103894786242483208151408445583131786212",
"218173652574822278898408317402945793684",
"234369273626214188867881054735990380433",
"136840179919294046460941863803174258763",
"296268050310514704308426655253464840444",
"120842118024458241526956197138102288531"
],
"threshold": 0.9
},
"id": "CVE-2022-50042-7060222c",
"signature_type": "Line"
},
{
"signature_version": "v1",
"target": {
"file": "net/netlink/policy.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@83411c9f05d5a8b637293b3389eca3d378197c04",
"deprecated": false,
"digest": {
"line_hashes": [
"129394455275853235221980196863476590642",
"207602487379929423731856322504554247890",
"295141010400994329605078787532009737871",
"83707521468154069361295857602898231252",
"55586657440026488025102591930392608508",
"298491033842692856838932624633538255226",
"143831625909857302181186419570827105396",
"112721398578729193083765879074641731005",
"191525638188066204191583534096652753818",
"331237305056096458384075482638222034572",
"16757891077220897957032267244961969590",
"271991315649067351396350487086253146876"
],
"threshold": 0.9
},
"id": "CVE-2022-50042-845f1185",
"signature_type": "Line"
},
{
"signature_version": "v1",
"target": {
"file": "net/netlink/policy.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@249801360db3dec4f73768c502192020bfddeacc",
"deprecated": false,
"digest": {
"line_hashes": [
"129394455275853235221980196863476590642",
"207602487379929423731856322504554247890",
"295141010400994329605078787532009737871",
"83707521468154069361295857602898231252",
"55586657440026488025102591930392608508",
"298491033842692856838932624633538255226",
"143831625909857302181186419570827105396",
"112721398578729193083765879074641731005",
"191525638188066204191583534096652753818",
"331237305056096458384075482638222034572",
"16757891077220897957032267244961969590",
"271991315649067351396350487086253146876"
],
"threshold": 0.9
},
"id": "CVE-2022-50042-928796d6",
"signature_type": "Line"
},
{
"signature_version": "v1",
"target": {
"file": "net/netlink/policy.c",
"function": "netlink_policy_dump_add_policy"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b0672895d8be5d19d4b05ac83f807026fc791037",
"deprecated": false,
"digest": {
"function_hash": "305556549993886244477461836730331318335",
"length": 754.0
},
"id": "CVE-2022-50042-a1a41706",
"signature_type": "Function"
},
{
"signature_version": "v1",
"target": {
"file": "net/netlink/genetlink.c",
"function": "ctrl_dumppolicy_start"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b0672895d8be5d19d4b05ac83f807026fc791037",
"deprecated": false,
"digest": {
"function_hash": "299671361865052203314367329275578245462",
"length": 1267.0
},
"id": "CVE-2022-50042-a6169556",
"signature_type": "Function"
},
{
"signature_version": "v1",
"target": {
"file": "net/netlink/genetlink.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@83411c9f05d5a8b637293b3389eca3d378197c04",
"deprecated": false,
"digest": {
"line_hashes": [
"104405332519522960522439745017264608630",
"330827633552781395785645289028442670775",
"78828392896317485488953111243907561258",
"103894786242483208151408445583131786212",
"218173652574822278898408317402945793684",
"234369273626214188867881054735990380433",
"136840179919294046460941863803174258763",
"296268050310514704308426655253464840444",
"120842118024458241526956197138102288531"
],
"threshold": 0.9
},
"id": "CVE-2022-50042-b8542873",
"signature_type": "Line"
},
{
"signature_version": "v1",
"target": {
"file": "net/netlink/policy.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b0672895d8be5d19d4b05ac83f807026fc791037",
"deprecated": false,
"digest": {
"line_hashes": [
"129394455275853235221980196863476590642",
"207602487379929423731856322504554247890",
"295141010400994329605078787532009737871",
"83707521468154069361295857602898231252",
"55586657440026488025102591930392608508",
"298491033842692856838932624633538255226",
"143831625909857302181186419570827105396",
"112721398578729193083765879074641731005",
"191525638188066204191583534096652753818",
"331237305056096458384075482638222034572",
"16757891077220897957032267244961969590",
"271991315649067351396350487086253146876"
],
"threshold": 0.9
},
"id": "CVE-2022-50042-e66cef86",
"signature_type": "Line"
},
{
"signature_version": "v1",
"target": {
"file": "net/netlink/genetlink.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@249801360db3dec4f73768c502192020bfddeacc",
"deprecated": false,
"digest": {
"line_hashes": [
"104405332519522960522439745017264608630",
"330827633552781395785645289028442670775",
"78828392896317485488953111243907561258",
"103894786242483208151408445583131786212",
"218173652574822278898408317402945793684",
"234369273626214188867881054735990380433",
"136840179919294046460941863803174258763",
"296268050310514704308426655253464840444",
"120842118024458241526956197138102288531"
],
"threshold": 0.9
},
"id": "CVE-2022-50042-ebf627ab",
"signature_type": "Line"
},
{
"signature_version": "v1",
"target": {
"file": "net/netlink/policy.c",
"function": "netlink_policy_dump_add_policy"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@26b6acd365823e99e46be3b27500f5dc235dda5e",
"deprecated": false,
"digest": {
"function_hash": "305556549993886244477461836730331318335",
"length": 754.0
},
"id": "CVE-2022-50042-ece02c0c",
"signature_type": "Function"
}
]