In the Linux kernel, the following vulnerability has been resolved:
netfilter: use getrandomu32 instead of prandom
bh might occur while updating per-cpu rndstate from user context, ie. localout path.
BUG: using smpprocessorid() in preemptible [00000000] code: nginx/2725 caller is nftngrandomeval+0x24/0x54 [nftnumgen] Call Trace: checkpreemptiondisabled+0xde/0xe0 nftngrandomeval+0x24/0x54 [nftnumgen]
Use the random driver instead, this also avoids need for local prandom state. Moreover, prandom now uses the random driver since d4150779e60f ("random32: use real rng for non-deterministic randomness").
Based on earlier patch from Pablo Neira.
[ { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b1fd94e704571f98b21027340eecf821b2bdffba", "target": { "file": "net/netfilter/nft_numgen.c" }, "id": "CVE-2022-49698-0560151e", "deprecated": false, "signature_type": "Line", "digest": { "line_hashes": [ "105282617153096363675840285251013301786", "312420812135302351103667683645009308000", "238107424419133029119453633172647133149", "64294686569279112428640120070365703842", "314821044066388649718998655528109309707", "180339974943848579976067413834866238903", "194477497238860749173454427578197017441", "325116981670257546027646617861572356028", "679371061266389668334786686072520726", "283410521323537699896688854683032732867", "259059586058702108048778591149419251036", "309263963311671640357981638525206944343", "71635830048217704685155327357829064898", "79239656570926447477600416562526470462", "310880055131301046919566152446597279220", "268683473592649451497882212631787829941", "261245577057263520120830136719840605871", "138040983948207333399567232186424276901", "160300584759691868852674732107851397394", "253211020350969373926861389737349499709" ], "threshold": 0.9 }, "signature_version": "v1" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d0906b0fffc9f19bc42708ca3e84e2089088386c", "target": { "file": "net/netfilter/nft_numgen.c" }, "id": "CVE-2022-49698-0c715b80", "deprecated": false, "signature_type": "Line", "digest": { "line_hashes": [ "105282617153096363675840285251013301786", "312420812135302351103667683645009308000", "238107424419133029119453633172647133149", "64294686569279112428640120070365703842", "314821044066388649718998655528109309707", "180339974943848579976067413834866238903", "194477497238860749173454427578197017441", "325116981670257546027646617861572356028", "679371061266389668334786686072520726", "283410521323537699896688854683032732867", "259059586058702108048778591149419251036", "309263963311671640357981638525206944343", "71635830048217704685155327357829064898", "79239656570926447477600416562526470462", "310880055131301046919566152446597279220", "268683473592649451497882212631787829941", "261245577057263520120830136719840605871", "138040983948207333399567232186424276901", "160300584759691868852674732107851397394", "253211020350969373926861389737349499709" ], "threshold": 0.9 }, "signature_version": "v1" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@15cc30ac2a8d7185f8ebf97dd1ddd90a7c79783b", "target": { "function": "nft_ng_random_gen", "file": "net/netfilter/nft_numgen.c" }, "id": "CVE-2022-49698-169ffbac", "deprecated": false, "signature_type": "Function", "digest": { "function_hash": "128437127526539898919847019517354171233", "length": 175.0 }, "signature_version": "v1" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d0906b0fffc9f19bc42708ca3e84e2089088386c", "target": { "function": "nft_ng_random_gen", "file": "net/netfilter/nft_numgen.c" }, "id": "CVE-2022-49698-2f161174", "deprecated": false, "signature_type": "Function", "digest": { "function_hash": "128437127526539898919847019517354171233", "length": 175.0 }, "signature_version": "v1" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@15cc30ac2a8d7185f8ebf97dd1ddd90a7c79783b", "target": { "function": "nft_prandom_u32", "file": "net/netfilter/nft_meta.c" }, "id": "CVE-2022-49698-442ed3e4", "deprecated": false, "signature_type": "Function", "digest": { "function_hash": "186190636015094381600536381631653814975", "length": 110.0 }, "signature_version": "v1" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6ce71f83f798be7e1ca68707fec449fbecb38852", "target": { "file": "net/netfilter/nft_numgen.c" }, "id": "CVE-2022-49698-5a1d98b9", "deprecated": false, "signature_type": "Line", "digest": { "line_hashes": [ "105282617153096363675840285251013301786", "312420812135302351103667683645009308000", "238107424419133029119453633172647133149", "64294686569279112428640120070365703842", "314821044066388649718998655528109309707", "180339974943848579976067413834866238903", "194477497238860749173454427578197017441", "325116981670257546027646617861572356028", "679371061266389668334786686072520726", "283410521323537699896688854683032732867", "259059586058702108048778591149419251036", "309263963311671640357981638525206944343", "71635830048217704685155327357829064898", "79239656570926447477600416562526470462", "310880055131301046919566152446597279220", "268683473592649451497882212631787829941", "261245577057263520120830136719840605871", "138040983948207333399567232186424276901", "160300584759691868852674732107851397394", "253211020350969373926861389737349499709" ], "threshold": 0.9 }, "signature_version": "v1" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@15cc30ac2a8d7185f8ebf97dd1ddd90a7c79783b", "target": { "file": "net/netfilter/nft_numgen.c" }, "id": "CVE-2022-49698-5ca3ac02", "deprecated": false, "signature_type": "Line", "digest": { "line_hashes": [ "105282617153096363675840285251013301786", "312420812135302351103667683645009308000", "238107424419133029119453633172647133149", "64294686569279112428640120070365703842", "314821044066388649718998655528109309707", "180339974943848579976067413834866238903", "194477497238860749173454427578197017441", "325116981670257546027646617861572356028", "679371061266389668334786686072520726", "283410521323537699896688854683032732867", "259059586058702108048778591149419251036", "309263963311671640357981638525206944343", "71635830048217704685155327357829064898", "79239656570926447477600416562526470462", "310880055131301046919566152446597279220", "268683473592649451497882212631787829941", "261245577057263520120830136719840605871", "138040983948207333399567232186424276901", "160300584759691868852674732107851397394", "253211020350969373926861389737349499709" ], "threshold": 0.9 }, "signature_version": "v1" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b1fd94e704571f98b21027340eecf821b2bdffba", "target": { "file": "net/netfilter/nft_meta.c" }, "id": "CVE-2022-49698-651b8b0e", "deprecated": false, "signature_type": "Line", "digest": { "line_hashes": [ "218143890450551360968536456866609882019", "207322263140025319047879645306918073376", "226627741142808694213937880766192314084", "208291174056185151976252323343090319612", "81794007135853091573827034952564182950", "142711188380356366428739300407227053392", "1812015333193498624829557371036854176", "94305805542564561754527691178075052594", "331062117433246880772364586610511325258", "45775491779506161933955208551254216999", "143923934789633836107886842716735981140", "266796461156224817142998447025098346337", "324532509784455455597339868378491606310", "329721113566129384168590051846045480901", "40558603856761144956401614913063183836", "14140782625347069679982317732535023190", "267038133878353945217275307177731421360", "220746450252732937807492430211380199674", "139513422504004262114410966370567787588", "19305698360753071141470153425023950043", "229998578457852775323938414736905679337", "35664124185957232365898602386175432176", "170544290771765750677643706815443314125", "120073235693837197263136063732580635967" ], "threshold": 0.9 }, "signature_version": "v1" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b1fd94e704571f98b21027340eecf821b2bdffba", "target": { "function": "nft_prandom_u32", "file": "net/netfilter/nft_meta.c" }, "id": "CVE-2022-49698-93bdeb52", "deprecated": false, "signature_type": "Function", "digest": { "function_hash": "186190636015094381600536381631653814975", "length": 110.0 }, "signature_version": "v1" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b1fd94e704571f98b21027340eecf821b2bdffba", "target": { "function": "nft_ng_random_gen", "file": "net/netfilter/nft_numgen.c" }, "id": "CVE-2022-49698-9e37baf4", "deprecated": false, "signature_type": "Function", "digest": { "function_hash": "128437127526539898919847019517354171233", "length": 175.0 }, "signature_version": "v1" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6ce71f83f798be7e1ca68707fec449fbecb38852", "target": { "file": "net/netfilter/nft_meta.c" }, "id": "CVE-2022-49698-c1cfff0e", "deprecated": false, "signature_type": "Line", "digest": { "line_hashes": [ "218143890450551360968536456866609882019", "207322263140025319047879645306918073376", "226627741142808694213937880766192314084", "208291174056185151976252323343090319612", "81794007135853091573827034952564182950", "142711188380356366428739300407227053392", "1812015333193498624829557371036854176", "94305805542564561754527691178075052594", "331062117433246880772364586610511325258", "45775491779506161933955208551254216999", "143923934789633836107886842716735981140", "266796461156224817142998447025098346337", "324532509784455455597339868378491606310", "329721113566129384168590051846045480901", "40558603856761144956401614913063183836", "14140782625347069679982317732535023190", "267038133878353945217275307177731421360", "220746450252732937807492430211380199674", "139513422504004262114410966370567787588", "19305698360753071141470153425023950043", "229998578457852775323938414736905679337", "35664124185957232365898602386175432176", "170544290771765750677643706815443314125", "120073235693837197263136063732580635967" ], "threshold": 0.9 }, "signature_version": "v1" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6ce71f83f798be7e1ca68707fec449fbecb38852", "target": { "function": "nft_ng_random_gen", "file": "net/netfilter/nft_numgen.c" }, "id": "CVE-2022-49698-c397ab78", "deprecated": false, "signature_type": "Function", "digest": { "function_hash": "128437127526539898919847019517354171233", "length": 175.0 }, "signature_version": "v1" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6ce71f83f798be7e1ca68707fec449fbecb38852", "target": { "function": "nft_prandom_u32", "file": "net/netfilter/nft_meta.c" }, "id": "CVE-2022-49698-e434625d", "deprecated": false, "signature_type": "Function", "digest": { "function_hash": "186190636015094381600536381631653814975", "length": 110.0 }, "signature_version": "v1" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d0906b0fffc9f19bc42708ca3e84e2089088386c", "target": { "function": "nft_prandom_u32", "file": "net/netfilter/nft_meta.c" }, "id": "CVE-2022-49698-e753c0d5", "deprecated": false, "signature_type": "Function", "digest": { "function_hash": "186190636015094381600536381631653814975", "length": 110.0 }, "signature_version": "v1" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d0906b0fffc9f19bc42708ca3e84e2089088386c", "target": { "file": "net/netfilter/nft_meta.c" }, "id": "CVE-2022-49698-f21604fc", "deprecated": false, "signature_type": "Line", "digest": { "line_hashes": [ "218143890450551360968536456866609882019", "207322263140025319047879645306918073376", "226627741142808694213937880766192314084", "208291174056185151976252323343090319612", "81794007135853091573827034952564182950", "142711188380356366428739300407227053392", "1812015333193498624829557371036854176", "94305805542564561754527691178075052594", "331062117433246880772364586610511325258", "45775491779506161933955208551254216999", "143923934789633836107886842716735981140", "266796461156224817142998447025098346337", "324532509784455455597339868378491606310", "329721113566129384168590051846045480901", "40558603856761144956401614913063183836", "14140782625347069679982317732535023190", "267038133878353945217275307177731421360", "220746450252732937807492430211380199674", "139513422504004262114410966370567787588", "19305698360753071141470153425023950043", "229998578457852775323938414736905679337", "35664124185957232365898602386175432176", "170544290771765750677643706815443314125", "120073235693837197263136063732580635967" ], "threshold": 0.9 }, "signature_version": "v1" }, { "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@15cc30ac2a8d7185f8ebf97dd1ddd90a7c79783b", "target": { "file": "net/netfilter/nft_meta.c" }, "id": "CVE-2022-49698-f24ff115", "deprecated": false, "signature_type": "Line", "digest": { "line_hashes": [ "218143890450551360968536456866609882019", "207322263140025319047879645306918073376", "226627741142808694213937880766192314084", "208291174056185151976252323343090319612", "81794007135853091573827034952564182950", "142711188380356366428739300407227053392", "1812015333193498624829557371036854176", "94305805542564561754527691178075052594", "331062117433246880772364586610511325258", "45775491779506161933955208551254216999", "143923934789633836107886842716735981140", "266796461156224817142998447025098346337", "324532509784455455597339868378491606310", "329721113566129384168590051846045480901", "40558603856761144956401614913063183836", "14140782625347069679982317732535023190", "267038133878353945217275307177731421360", "220746450252732937807492430211380199674", "139513422504004262114410966370567787588", "19305698360753071141470153425023950043", "229998578457852775323938414736905679337", "35664124185957232365898602386175432176", "170544290771765750677643706815443314125", "120073235693837197263136063732580635967" ], "threshold": 0.9 }, "signature_version": "v1" } ]