In the Linux kernel, the following vulnerability has been resolved:
netfilter: nftables: do not allow CHAINID to refer to another table
When doing lookups for chains on the same batch by using its ID, a chain from a different table can be used. If a rule is added to a table but refers to a chain in a different table, it will be linked to the chain in table2, but would have expressions referring to objects in table1.
Then, when table1 is removed, the rule will not be removed as its linked to a chain in table2. When expressions in the rule are processed or removed, that will lead to a use-after-free.
When looking for chains by ID, use the table that was used for the lookup by name, and only return chains belonging to that same table.
{ "vanir_signatures": [ { "signature_type": "Line", "id": "CVE-2022-50212-18dccd36", "deprecated": false, "digest": { "threshold": 0.9, "line_hashes": [ "48031504353001649874697858285567648463", "260617287399121873867564885508828689815", "217196073838864341481818928066498701225", "4436411849370879890712158530246240651", "183583655383799983005208932464338073028", "214040077530459536156003801381277290471", "321764029105474878588465716593691225248", "281044482100427260762903437439763120519", "43787748471801081762949592649695962279", "271457921039446098735554830963770486599", "20445429945357129143368225160002029106", "75711188624136322949585282900958855818", "333478963862402130919211776623622571742", "331497148395129527694330746778045137087", "49236775780469786470440027465111813337", "177562792727683425447377730160174646883" ] }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@95f466d22364a33d183509629d0879885b4f547e", "signature_version": "v1", "target": { "file": "net/netfilter/nf_tables_api.c" } }, { "signature_type": "Function", "id": "CVE-2022-50212-19a3e1d1", "deprecated": false, "digest": { "length": 1303.0, "function_hash": "172981924886231532862516756276306043064" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@91501513016903077f91033fa5d2aa26cac399b2", "signature_version": "v1", "target": { "function": "nft_verdict_init", "file": "net/netfilter/nf_tables_api.c" } }, { "signature_type": "Function", "id": "CVE-2022-50212-2178243f", "deprecated": false, "digest": { "length": 1303.0, "function_hash": "172981924886231532862516756276306043064" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0f49613a213d918af790c1276f79da741968de11", "signature_version": "v1", "target": { "function": "nft_verdict_init", "file": "net/netfilter/nf_tables_api.c" } }, { "signature_type": "Line", "id": "CVE-2022-50212-4431a45f", "deprecated": false, "digest": { "threshold": 0.9, "line_hashes": [ "48031504353001649874697858285567648463", "260617287399121873867564885508828689815", "217196073838864341481818928066498701225", "4436411849370879890712158530246240651", "183583655383799983005208932464338073028", "214040077530459536156003801381277290471", "321764029105474878588465716593691225248", "281044482100427260762903437439763120519", "43787748471801081762949592649695962279", "271457921039446098735554830963770486599", "20445429945357129143368225160002029106", "75711188624136322949585282900958855818", "333478963862402130919211776623622571742", "331497148395129527694330746778045137087", "49236775780469786470440027465111813337", "177562792727683425447377730160174646883" ] }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@91501513016903077f91033fa5d2aa26cac399b2", "signature_version": "v1", "target": { "file": "net/netfilter/nf_tables_api.c" } }, { "signature_type": "Function", "id": "CVE-2022-50212-44e2ae94", "deprecated": false, "digest": { "length": 377.0, "function_hash": "336599856130829022530883204427267332801" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0f49613a213d918af790c1276f79da741968de11", "signature_version": "v1", "target": { "function": "nft_chain_lookup_byid", "file": "net/netfilter/nf_tables_api.c" } }, { "signature_type": "Function", "id": "CVE-2022-50212-737164a6", "deprecated": false, "digest": { "length": 377.0, "function_hash": "336599856130829022530883204427267332801" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@91501513016903077f91033fa5d2aa26cac399b2", "signature_version": "v1", "target": { "function": "nft_chain_lookup_byid", "file": "net/netfilter/nf_tables_api.c" } }, { "signature_type": "Function", "id": "CVE-2022-50212-7a19ff29", "deprecated": false, "digest": { "length": 1303.0, "function_hash": "172981924886231532862516756276306043064" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@58e863f64ee3d0879297e5e53b646e4b91e59620", "signature_version": "v1", "target": { "function": "nft_verdict_init", "file": "net/netfilter/nf_tables_api.c" } }, { "signature_type": "Function", "id": "CVE-2022-50212-a0628aa9", "deprecated": false, "digest": { "length": 350.0, "function_hash": "108922203738518242941462694375031049753" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9e7dcb88ec8e85e4a8ad0ea494ea2f90f32d2583", "signature_version": "v1", "target": { "function": "nft_chain_lookup_byid", "file": "net/netfilter/nf_tables_api.c" } }, { "signature_type": "Function", "id": "CVE-2022-50212-ba7b76f2", "deprecated": false, "digest": { "length": 1303.0, "function_hash": "172981924886231532862516756276306043064" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@95f466d22364a33d183509629d0879885b4f547e", "signature_version": "v1", "target": { "function": "nft_verdict_init", "file": "net/netfilter/nf_tables_api.c" } }, { "signature_type": "Line", "id": "CVE-2022-50212-c29170f3", "deprecated": false, "digest": { "threshold": 0.9, "line_hashes": [ "48031504353001649874697858285567648463", "260617287399121873867564885508828689815", "217196073838864341481818928066498701225", "4436411849370879890712158530246240651", "183583655383799983005208932464338073028", "214040077530459536156003801381277290471", "321764029105474878588465716593691225248", "281044482100427260762903437439763120519", "43787748471801081762949592649695962279", "271457921039446098735554830963770486599", "20445429945357129143368225160002029106", "75711188624136322949585282900958855818", "333478963862402130919211776623622571742", "331497148395129527694330746778045137087", "49236775780469786470440027465111813337", "177562792727683425447377730160174646883" ] }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@58e863f64ee3d0879297e5e53b646e4b91e59620", "signature_version": "v1", "target": { "file": "net/netfilter/nf_tables_api.c" } }, { "signature_type": "Line", "id": "CVE-2022-50212-c902c441", "deprecated": false, "digest": { "threshold": 0.9, "line_hashes": [ "48031504353001649874697858285567648463", "260617287399121873867564885508828689815", "217196073838864341481818928066498701225", "182450013322319572282179613311250202688", "160734693270367362957999027976181117836", "181423236215489975251976554010656322660", "321764029105474878588465716593691225248", "281044482100427260762903437439763120519", "43787748471801081762949592649695962279", "271457921039446098735554830963770486599", "20445429945357129143368225160002029106", "75711188624136322949585282900958855818", "333478963862402130919211776623622571742", "331497148395129527694330746778045137087", "49236775780469786470440027465111813337", "177562792727683425447377730160174646883" ] }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9e7dcb88ec8e85e4a8ad0ea494ea2f90f32d2583", "signature_version": "v1", "target": { "file": "net/netfilter/nf_tables_api.c" } }, { "signature_type": "Function", "id": "CVE-2022-50212-c97cea0b", "deprecated": false, "digest": { "length": 377.0, "function_hash": "336599856130829022530883204427267332801" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@58e863f64ee3d0879297e5e53b646e4b91e59620", "signature_version": "v1", "target": { "function": "nft_chain_lookup_byid", "file": "net/netfilter/nf_tables_api.c" } }, { "signature_type": "Function", "id": "CVE-2022-50212-e3e1ef21", "deprecated": false, "digest": { "length": 377.0, "function_hash": "336599856130829022530883204427267332801" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@95f466d22364a33d183509629d0879885b4f547e", "signature_version": "v1", "target": { "function": "nft_chain_lookup_byid", "file": "net/netfilter/nf_tables_api.c" } }, { "signature_type": "Function", "id": "CVE-2022-50212-efb3a91e", "deprecated": false, "digest": { "length": 1303.0, "function_hash": "172981924886231532862516756276306043064" }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9e7dcb88ec8e85e4a8ad0ea494ea2f90f32d2583", "signature_version": "v1", "target": { "function": "nft_verdict_init", "file": "net/netfilter/nf_tables_api.c" } }, { "signature_type": "Line", "id": "CVE-2022-50212-fc95001b", "deprecated": false, "digest": { "threshold": 0.9, "line_hashes": [ "48031504353001649874697858285567648463", "260617287399121873867564885508828689815", "217196073838864341481818928066498701225", "4436411849370879890712158530246240651", "183583655383799983005208932464338073028", "214040077530459536156003801381277290471", "321764029105474878588465716593691225248", "281044482100427260762903437439763120519", "43787748471801081762949592649695962279", "271457921039446098735554830963770486599", "20445429945357129143368225160002029106", "75711188624136322949585282900958855818", "333478963862402130919211776623622571742", "331497148395129527694330746778045137087", "49236775780469786470440027465111813337", "177562792727683425447377730160174646883" ] }, "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0f49613a213d918af790c1276f79da741968de11", "signature_version": "v1", "target": { "file": "net/netfilter/nf_tables_api.c" } } ] }