In the Linux kernel, the following vulnerability has been resolved:
net/mlx5: E-Switch, pair only capable devices
OFFLOADS paring using devcom is possible only on devices that support LAG. Filter based on lag capabilities.
This fixes an issue where mlx5getnextphysdev() was called without holding the interface lock.
This issue was found when commit bc4c2f2e0179 ("net/mlx5: Lag, filter non compatible devices") added an assert that verifies the interface lock is held.
WARNING: CPU: 9 PID: 1706 at drivers/net/ethernet/mellanox/mlx5/core/dev.c:642 mlx5getnextphysdev+0xd2/0x100 [mlx5core] Modules linked in: mlx5vdpa vringh vhostiotlb vdpa mlx5ib mlx5core xtconntrack xtMASQUERADE nfconntracknetlink nfnetlink xtaddrtype iptablenat nfnat brnetfilter rpcrdma rdmaucm ibiser libiscsi scsitransportiscsi rdmacm iwcm ibumad ibipoib ibcm ibuverbs ibcore overlay fuse [last unloaded: mlx5core] CPU: 9 PID: 1706 Comm: devlink Not tainted 5.18.0-rc7+ #11 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 RIP: 0010:mlx5getnextphysdev+0xd2/0x100 [mlx5core] Code: 02 00 75 48 48 8b 85 80 04 00 00 5d c3 31 c0 5d c3 be ff ff ff ff 48 c7 c7 08 41 5b a0 e8 36 87 28 e3 85 c0 0f 85 6f ff ff ff <0f> 0b e9 68 ff ff ff 48 c7 c7 0c 91 cc 84 e8 cb 36 6f e1 e9 4d ff RSP: 0018:ffff88811bf47458 EFLAGS: 00010246 RAX: 0000000000000000 RBX: ffff88811b398000 RCX: 0000000000000001 RDX: 0000000080000000 RSI: ffffffffa05b4108 RDI: ffff88812daaaa78 RBP: ffff88812d050380 R08: 0000000000000001 R09: ffff88811d6b3437 R10: 0000000000000001 R11: 00000000fddd3581 R12: ffff88815238c000 R13: ffff88812d050380 R14: ffff8881018aa7e0 R15: ffff88811d6b3428 FS: 00007fc82e18ae80(0000) GS:ffff88842e080000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 00007f9630d1b421 CR3: 0000000149802004 CR4: 0000000000370ea0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: <TASK> mlx5eswoffloadsdevcomevent+0x99/0x3b0 [mlx5core] mlx5devcomsendevent+0x167/0x1d0 [mlx5core] eswoffloadsenable+0x1153/0x1500 [mlx5core] ? mlx5eswoffloadscontrollervalid+0x170/0x170 [mlx5core] ? waitforcompletioniotimeout+0x20/0x20 ? mlx5rescandriverslocked+0x318/0x810 [mlx5core] mlx5eswitchenablelocked+0x586/0xc50 [mlx5core] ? mlx5eswitchdisablepfvfvports+0x1d0/0x1d0 [mlx5core] ? mlx5eswtrylock+0x1b/0xb0 [mlx5core] ? mlx5eswitchenable+0x270/0x270 [mlx5core] ? _debugfscreatefile+0x260/0x3e0 mlx5devlinkeswitchmodeset+0x27e/0x870 [mlx5core] ? mutexlockionested+0x12c0/0x12c0 ? eswoffloadsdisable+0x250/0x250 [mlx5core] ? devlinknlcmdtrapgetdumpit+0x470/0x470 ? rcureadlockschedheld+0x3f/0x70 devlinknlcmdeswitchsetdoit+0x217/0x620
{
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/49xxx/CVE-2022-49333.json"
}[
{
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c"
},
"signature_version": "v1",
"id": "CVE-2022-49333-0012fae8",
"digest": {
"line_hashes": [
"149741357936596797749622654878445567029",
"211487503116974700862952410830811372237",
"111789203414329643607362612585126151579",
"280239160913470025595471567353091287927",
"307306891547227054052066446782999772292",
"248702712000697106392081132417590449102",
"140840584102313546731708202911583625797",
"163663399795378399134767633797529392868",
"329554669941737280873343670690786439364",
"265696910644209612507829132546213645064",
"3892325146908897856078826015567840505"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3008e6a0049361e731b803c60fe8f3ab44e1d73f",
"signature_type": "Line",
"deprecated": false
},
{
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/dev.c",
"function": "next_phys_dev"
},
"signature_version": "v1",
"id": "CVE-2022-49333-0278ec98",
"digest": {
"function_hash": "65792260278186526879973936970599495928",
"length": 208.0
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3008e6a0049361e731b803c60fe8f3ab44e1d73f",
"signature_type": "Function",
"deprecated": false
},
{
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c",
"function": "mlx5_esw_offloads_devcom_event"
},
"signature_version": "v1",
"id": "CVE-2022-49333-0d2e556b",
"digest": {
"function_hash": "18706372637742081414318202601308990902",
"length": 1000.0
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cdbcdddb8076a09aa6ddaf20fd911fc787dca0e5",
"signature_type": "Function",
"deprecated": false
},
{
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c",
"function": "esw_offloads_devcom_init"
},
"signature_version": "v1",
"id": "CVE-2022-49333-10e0b7fb",
"digest": {
"function_hash": "181155956369398557991639846425589613937",
"length": 411.0
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cdbcdddb8076a09aa6ddaf20fd911fc787dca0e5",
"signature_type": "Function",
"deprecated": false
},
{
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c",
"function": "esw_offloads_devcom_init"
},
"signature_version": "v1",
"id": "CVE-2022-49333-11dc1e72",
"digest": {
"function_hash": "181155956369398557991639846425589613937",
"length": 411.0
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0cef0b7eb044bb8cfdaff4c1db55a8fd442f6bc9",
"signature_type": "Function",
"deprecated": false
},
{
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h"
},
"signature_version": "v1",
"id": "CVE-2022-49333-130c3bae",
"digest": {
"line_hashes": [
"312346807895293740541428567520503497008",
"249144749411564822403738793356207920374",
"210899893478223287272627336760013424096",
"158331549897593432294405461547397152985"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3008e6a0049361e731b803c60fe8f3ab44e1d73f",
"signature_type": "Line",
"deprecated": false
},
{
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c"
},
"signature_version": "v1",
"id": "CVE-2022-49333-2073ae22",
"digest": {
"line_hashes": [
"187574564779834643499568021242681493158",
"281242252905127203982498996786889762436",
"232988911610279516928386076230974738213",
"331113181871389747191617311160673335507",
"149741357936596797749622654878445567029",
"211487503116974700862952410830811372237",
"111789203414329643607362612585126151579",
"280239160913470025595471567353091287927",
"307306891547227054052066446782999772292",
"248702712000697106392081132417590449102",
"140840584102313546731708202911583625797",
"163663399795378399134767633797529392868",
"329554669941737280873343670690786439364",
"265696910644209612507829132546213645064",
"3892325146908897856078826015567840505"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cdbcdddb8076a09aa6ddaf20fd911fc787dca0e5",
"signature_type": "Line",
"deprecated": false
},
{
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/lag/lag.h"
},
"signature_version": "v1",
"id": "CVE-2022-49333-28ca2903",
"digest": {
"line_hashes": [
"255219895147256860665796669448592824040",
"107608878010110837508362278544307184483",
"73263259435545662416125061055386193562"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0cef0b7eb044bb8cfdaff4c1db55a8fd442f6bc9",
"signature_type": "Line",
"deprecated": false
},
{
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/dev.c",
"function": "mlx5_get_next_phys_dev"
},
"signature_version": "v1",
"id": "CVE-2022-49333-2934a860",
"digest": {
"function_hash": "38954416542810736578472752573363038886",
"length": 117.0
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cdbcdddb8076a09aa6ddaf20fd911fc787dca0e5",
"signature_type": "Function",
"deprecated": false
},
{
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c",
"function": "esw_offloads_devcom_init"
},
"signature_version": "v1",
"id": "CVE-2022-49333-2cdf607b",
"digest": {
"function_hash": "181155956369398557991639846425589613937",
"length": 411.0
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3008e6a0049361e731b803c60fe8f3ab44e1d73f",
"signature_type": "Function",
"deprecated": false
},
{
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/dev.c",
"function": "next_phys_dev"
},
"signature_version": "v1",
"id": "CVE-2022-49333-4926df7d",
"digest": {
"function_hash": "65792260278186526879973936970599495928",
"length": 208.0
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0cef0b7eb044bb8cfdaff4c1db55a8fd442f6bc9",
"signature_type": "Function",
"deprecated": false
},
{
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/dev.c"
},
"signature_version": "v1",
"id": "CVE-2022-49333-4dd78463",
"digest": {
"line_hashes": [
"63791409152693561355592398553171623112",
"167287132553138810393609786165497685608",
"140970330951959435091283588852782209350",
"35311676030294467211399160982271948751",
"286318260939130448495957823312511569127",
"295088063324540442560631800881734621627",
"97187251512627880104447598938045285885",
"97229365274811378675078346502656405863",
"150798852115076582751989910047925406213",
"53025126627849092519685048347458004913",
"33637514182716164504303407713269170133",
"294996559262928586586375017479574478694",
"186840428192650665627644773131348665211",
"153155055809789878255514359060567173698",
"2895736430746646980216432042454845654",
"51462778662039385543135052087892971489",
"78334017816430736215016542318998361491",
"250822503718352704951666522115921188118",
"182154921671655197096072851004654815712"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3008e6a0049361e731b803c60fe8f3ab44e1d73f",
"signature_type": "Line",
"deprecated": false
},
{
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/lag/lag.h"
},
"signature_version": "v1",
"id": "CVE-2022-49333-68659dd6",
"digest": {
"line_hashes": [
"255219895147256860665796669448592824040",
"107608878010110837508362278544307184483",
"73263259435545662416125061055386193562"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cdbcdddb8076a09aa6ddaf20fd911fc787dca0e5",
"signature_type": "Line",
"deprecated": false
},
{
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c",
"function": "mlx5_esw_offloads_devcom_event"
},
"signature_version": "v1",
"id": "CVE-2022-49333-6ec8fe71",
"digest": {
"function_hash": "18706372637742081414318202601308990902",
"length": 1000.0
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3008e6a0049361e731b803c60fe8f3ab44e1d73f",
"signature_type": "Function",
"deprecated": false
},
{
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/dev.c",
"function": "mlx5_get_next_phys_dev"
},
"signature_version": "v1",
"id": "CVE-2022-49333-7a574c6e",
"digest": {
"function_hash": "38954416542810736578472752573363038886",
"length": 117.0
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3008e6a0049361e731b803c60fe8f3ab44e1d73f",
"signature_type": "Function",
"deprecated": false
},
{
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c",
"function": "esw_offloads_devcom_cleanup"
},
"signature_version": "v1",
"id": "CVE-2022-49333-7b7ea7ca",
"digest": {
"function_hash": "93016786257630064615986646643455110323",
"length": 276.0
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cdbcdddb8076a09aa6ddaf20fd911fc787dca0e5",
"signature_type": "Function",
"deprecated": false
},
{
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/lag/lag.h"
},
"signature_version": "v1",
"id": "CVE-2022-49333-969ac290",
"digest": {
"line_hashes": [
"133384933754022378563445520936420873032",
"56460805501130876051683316716906860869",
"73263259435545662416125061055386193562"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3008e6a0049361e731b803c60fe8f3ab44e1d73f",
"signature_type": "Line",
"deprecated": false
},
{
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c",
"function": "esw_offloads_devcom_cleanup"
},
"signature_version": "v1",
"id": "CVE-2022-49333-97f9e39b",
"digest": {
"function_hash": "93016786257630064615986646643455110323",
"length": 276.0
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0cef0b7eb044bb8cfdaff4c1db55a8fd442f6bc9",
"signature_type": "Function",
"deprecated": false
},
{
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/dev.c",
"function": "mlx5_get_next_phys_dev"
},
"signature_version": "v1",
"id": "CVE-2022-49333-98a892b2",
"digest": {
"function_hash": "38954416542810736578472752573363038886",
"length": 117.0
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0cef0b7eb044bb8cfdaff4c1db55a8fd442f6bc9",
"signature_type": "Function",
"deprecated": false
},
{
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c"
},
"signature_version": "v1",
"id": "CVE-2022-49333-b308fbc1",
"digest": {
"line_hashes": [
"187574564779834643499568021242681493158",
"281242252905127203982498996786889762436",
"232988911610279516928386076230974738213",
"331113181871389747191617311160673335507",
"149741357936596797749622654878445567029",
"211487503116974700862952410830811372237",
"111789203414329643607362612585126151579",
"280239160913470025595471567353091287927",
"307306891547227054052066446782999772292",
"248702712000697106392081132417590449102",
"140840584102313546731708202911583625797",
"163663399795378399134767633797529392868",
"329554669941737280873343670690786439364",
"265696910644209612507829132546213645064",
"3892325146908897856078826015567840505"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0cef0b7eb044bb8cfdaff4c1db55a8fd442f6bc9",
"signature_type": "Line",
"deprecated": false
},
{
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h"
},
"signature_version": "v1",
"id": "CVE-2022-49333-c655532b",
"digest": {
"line_hashes": [
"312346807895293740541428567520503497008",
"249144749411564822403738793356207920374",
"210899893478223287272627336760013424096",
"158331549897593432294405461547397152985"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0cef0b7eb044bb8cfdaff4c1db55a8fd442f6bc9",
"signature_type": "Line",
"deprecated": false
},
{
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c",
"function": "mlx5_esw_offloads_devcom_event"
},
"signature_version": "v1",
"id": "CVE-2022-49333-d139ffee",
"digest": {
"function_hash": "18706372637742081414318202601308990902",
"length": 1000.0
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0cef0b7eb044bb8cfdaff4c1db55a8fd442f6bc9",
"signature_type": "Function",
"deprecated": false
},
{
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h"
},
"signature_version": "v1",
"id": "CVE-2022-49333-daadad4d",
"digest": {
"line_hashes": [
"312346807895293740541428567520503497008",
"249144749411564822403738793356207920374",
"210899893478223287272627336760013424096",
"158331549897593432294405461547397152985"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cdbcdddb8076a09aa6ddaf20fd911fc787dca0e5",
"signature_type": "Line",
"deprecated": false
},
{
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c",
"function": "esw_offloads_devcom_cleanup"
},
"signature_version": "v1",
"id": "CVE-2022-49333-e2e5f6c1",
"digest": {
"function_hash": "93016786257630064615986646643455110323",
"length": 276.0
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3008e6a0049361e731b803c60fe8f3ab44e1d73f",
"signature_type": "Function",
"deprecated": false
},
{
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/dev.c"
},
"signature_version": "v1",
"id": "CVE-2022-49333-ea8db487",
"digest": {
"line_hashes": [
"63791409152693561355592398553171623112",
"167287132553138810393609786165497685608",
"140970330951959435091283588852782209350",
"35311676030294467211399160982271948751",
"286318260939130448495957823312511569127",
"295088063324540442560631800881734621627",
"97187251512627880104447598938045285885",
"97229365274811378675078346502656405863",
"150798852115076582751989910047925406213",
"53025126627849092519685048347458004913",
"33637514182716164504303407713269170133",
"294996559262928586586375017479574478694",
"186840428192650665627644773131348665211",
"153155055809789878255514359060567173698",
"2895736430746646980216432042454845654",
"51462778662039385543135052087892971489",
"78334017816430736215016542318998361491",
"250822503718352704951666522115921188118",
"182154921671655197096072851004654815712"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cdbcdddb8076a09aa6ddaf20fd911fc787dca0e5",
"signature_type": "Line",
"deprecated": false
},
{
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/dev.c"
},
"signature_version": "v1",
"id": "CVE-2022-49333-f854f95b",
"digest": {
"line_hashes": [
"63791409152693561355592398553171623112",
"167287132553138810393609786165497685608",
"140970330951959435091283588852782209350",
"35311676030294467211399160982271948751",
"286318260939130448495957823312511569127",
"295088063324540442560631800881734621627",
"97187251512627880104447598938045285885",
"97229365274811378675078346502656405863",
"150798852115076582751989910047925406213",
"53025126627849092519685048347458004913",
"33637514182716164504303407713269170133",
"294996559262928586586375017479574478694",
"186840428192650665627644773131348665211",
"153155055809789878255514359060567173698",
"2895736430746646980216432042454845654",
"51462778662039385543135052087892971489",
"78334017816430736215016542318998361491",
"250822503718352704951666522115921188118",
"182154921671655197096072851004654815712"
],
"threshold": 0.9
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0cef0b7eb044bb8cfdaff4c1db55a8fd442f6bc9",
"signature_type": "Line",
"deprecated": false
},
{
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/dev.c",
"function": "next_phys_dev"
},
"signature_version": "v1",
"id": "CVE-2022-49333-fec2df82",
"digest": {
"function_hash": "65792260278186526879973936970599495928",
"length": 208.0
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@cdbcdddb8076a09aa6ddaf20fd911fc787dca0e5",
"signature_type": "Function",
"deprecated": false
}
]