In the Linux kernel, the following vulnerability has been resolved:
net/mlx5e: Fix handling of wrong devices during bond netevent
Current implementation of bond netevent handler only check if the handled netdev is VF representor and it missing a check if the VF representor is on the same phys device of the bond handling the netevent.
Fix by adding the missing check and optimizing the check if the netdev is VF representor so it will not access uninitialized private data and crashes.
BUG: kernel NULL pointer dereference, address: 000000000000036c PGD 0 P4D 0 Oops: 0000 [#1] SMP NOPTI Workqueue: eth3bond0 bondmiimonitor [bonding] RIP: 0010:mlx5eisuplinkrep+0xc/0x50 [mlx5core] RSP: 0018:ffff88812d69fd60 EFLAGS: 00010282 RAX: 0000000000000000 RBX: ffff8881cf800000 RCX: 0000000000000000 RDX: ffff88812d69fe10 RSI: 000000000000001b RDI: ffff8881cf800880 RBP: ffff8881cf800000 R08: 00000445cabccf2b R09: 0000000000000008 R10: 0000000000000004 R11: 0000000000000008 R12: ffff88812d69fe10 R13: 00000000fffffffe R14: ffff88820c0f9000 R15: 0000000000000000 FS: 0000000000000000(0000) GS:ffff88846fb00000(0000) knlGS:0000000000000000 CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033 CR2: 000000000000036c CR3: 0000000103d80006 CR4: 0000000000370ea0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400 Call Trace: mlx5eeswitchuplinkrep+0x31/0x40 [mlx5core] mlx5erepislagnetdev+0x94/0xc0 [mlx5core] mlx5erepeswbondnetevent+0xeb/0x3d0 [mlx5core] rawnotifiercallchain+0x41/0x60 callnetdevicenotifiersinfo+0x34/0x80 netdevlowerstatechanged+0x4e/0xa0 bondmiimonitor+0x56b/0x640 [bonding] processonework+0x1b9/0x390 workerthread+0x4d/0x3d0 ? rescuerthread+0x350/0x350 kthread+0x124/0x150 ? setkthreadstruct+0x40/0x40 retfrom_fork+0x1f/0x30
{
"cna_assigner": "Linux",
"osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2022/48xxx/CVE-2022-48746.json"
}[
{
"signature_version": "v1",
"digest": {
"function_hash": "160312025035659469487175782620563929804",
"length": 496.0
},
"signature_type": "Function",
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/en/rep/bond.c",
"function": "mlx5e_rep_changeupper_event"
},
"deprecated": false,
"id": "CVE-2022-48746-13d797fd",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a01ee1b8165f4161459b5ec4e728bc7130fe8cd4"
},
{
"signature_version": "v1",
"digest": {
"line_hashes": [
"326396055330571676674294940637522257709",
"30591010309697943116852114970414062326",
"6017155596064216202897350582491596815",
"51355444299964547200196364194942435969",
"258510147694526802589187021679688100163",
"168292945512831937388822146692729398869",
"336996863316251444192501421526324286722",
"39761183667390724906021132773067401001",
"128373624775011545742155564306275327406",
"130003900647709499917493198098329110068",
"153189616272412512784342177487047351774",
"326017094105944669630012190743308316465",
"250236940088756590758267853803564646124",
"55365558609543888706594787070295338658",
"336646257442815854094156917951674250093",
"111831536787349602875962035604967087915",
"106577281090055095696757183993925248430",
"76209733475021507566591585633820840802",
"61579210328490229860259209828804908264",
"312416540603887930120502123978699912454",
"187807407438935760699744523031408995219",
"296986427796673729286253156247814258240",
"171826190964313727551115877752442798260",
"136982669770279113103794700564867677621"
],
"threshold": 0.9
},
"signature_type": "Line",
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/en/rep/bond.c"
},
"deprecated": false,
"id": "CVE-2022-48746-2f6023e0",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a01ee1b8165f4161459b5ec4e728bc7130fe8cd4"
},
{
"signature_version": "v1",
"digest": {
"function_hash": "258324735850920146982137521030517913851",
"length": 286.0
},
"signature_type": "Function",
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/en/rep/bond.c",
"function": "mlx5e_rep_esw_bond_netevent"
},
"deprecated": false,
"id": "CVE-2022-48746-5ff98e34",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a01ee1b8165f4161459b5ec4e728bc7130fe8cd4"
},
{
"signature_version": "v1",
"digest": {
"function_hash": "180569863699703596179381379636234019367",
"length": 236.0
},
"signature_type": "Function",
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/en/rep/bond.c",
"function": "mlx5e_rep_is_lag_netdev"
},
"deprecated": false,
"id": "CVE-2022-48746-682cd5ac",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4fad499d7fece448e7230d5e5b92f6d8a073e0bb"
},
{
"signature_version": "v1",
"digest": {
"function_hash": "160312025035659469487175782620563929804",
"length": 496.0
},
"signature_type": "Function",
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/en/rep/bond.c",
"function": "mlx5e_rep_changeupper_event"
},
"deprecated": false,
"id": "CVE-2022-48746-6dbc3900",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ec41332e02bd0acf1f24206867bb6a02f5877a62"
},
{
"signature_version": "v1",
"digest": {
"function_hash": "258324735850920146982137521030517913851",
"length": 286.0
},
"signature_type": "Function",
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/en/rep/bond.c",
"function": "mlx5e_rep_esw_bond_netevent"
},
"deprecated": false,
"id": "CVE-2022-48746-778aaf08",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4fad499d7fece448e7230d5e5b92f6d8a073e0bb"
},
{
"signature_version": "v1",
"digest": {
"function_hash": "326491430856907330068348677594132237436",
"length": 1021.0
},
"signature_type": "Function",
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/en/rep/bond.c",
"function": "mlx5e_rep_changelowerstate_event"
},
"deprecated": false,
"id": "CVE-2022-48746-79ac3814",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@fe70126da6063c29ca161cdec7ad1dae9af836b3"
},
{
"signature_version": "v1",
"digest": {
"function_hash": "326491430856907330068348677594132237436",
"length": 1021.0
},
"signature_type": "Function",
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/en/rep/bond.c",
"function": "mlx5e_rep_changelowerstate_event"
},
"deprecated": false,
"id": "CVE-2022-48746-81564e5c",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ec41332e02bd0acf1f24206867bb6a02f5877a62"
},
{
"signature_version": "v1",
"digest": {
"function_hash": "160312025035659469487175782620563929804",
"length": 496.0
},
"signature_type": "Function",
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/en/rep/bond.c",
"function": "mlx5e_rep_changeupper_event"
},
"deprecated": false,
"id": "CVE-2022-48746-8b72e061",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@fe70126da6063c29ca161cdec7ad1dae9af836b3"
},
{
"signature_version": "v1",
"digest": {
"function_hash": "258324735850920146982137521030517913851",
"length": 286.0
},
"signature_type": "Function",
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/en/rep/bond.c",
"function": "mlx5e_rep_esw_bond_netevent"
},
"deprecated": false,
"id": "CVE-2022-48746-9092d36a",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ec41332e02bd0acf1f24206867bb6a02f5877a62"
},
{
"signature_version": "v1",
"digest": {
"function_hash": "326491430856907330068348677594132237436",
"length": 1021.0
},
"signature_type": "Function",
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/en/rep/bond.c",
"function": "mlx5e_rep_changelowerstate_event"
},
"deprecated": false,
"id": "CVE-2022-48746-95ba2242",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4fad499d7fece448e7230d5e5b92f6d8a073e0bb"
},
{
"signature_version": "v1",
"digest": {
"line_hashes": [
"326396055330571676674294940637522257709",
"30591010309697943116852114970414062326",
"6017155596064216202897350582491596815",
"51355444299964547200196364194942435969",
"258510147694526802589187021679688100163",
"168292945512831937388822146692729398869",
"336996863316251444192501421526324286722",
"39761183667390724906021132773067401001",
"128373624775011545742155564306275327406",
"130003900647709499917493198098329110068",
"153189616272412512784342177487047351774",
"326017094105944669630012190743308316465",
"250236940088756590758267853803564646124",
"55365558609543888706594787070295338658",
"336646257442815854094156917951674250093",
"111831536787349602875962035604967087915",
"106577281090055095696757183993925248430",
"76209733475021507566591585633820840802",
"61579210328490229860259209828804908264",
"312416540603887930120502123978699912454",
"187807407438935760699744523031408995219",
"296986427796673729286253156247814258240",
"171826190964313727551115877752442798260",
"136982669770279113103794700564867677621"
],
"threshold": 0.9
},
"signature_type": "Line",
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/en/rep/bond.c"
},
"deprecated": false,
"id": "CVE-2022-48746-95ecc15e",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ec41332e02bd0acf1f24206867bb6a02f5877a62"
},
{
"signature_version": "v1",
"digest": {
"function_hash": "180569863699703596179381379636234019367",
"length": 236.0
},
"signature_type": "Function",
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/en/rep/bond.c",
"function": "mlx5e_rep_is_lag_netdev"
},
"deprecated": false,
"id": "CVE-2022-48746-9a419f01",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a01ee1b8165f4161459b5ec4e728bc7130fe8cd4"
},
{
"signature_version": "v1",
"digest": {
"function_hash": "180569863699703596179381379636234019367",
"length": 236.0
},
"signature_type": "Function",
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/en/rep/bond.c",
"function": "mlx5e_rep_is_lag_netdev"
},
"deprecated": false,
"id": "CVE-2022-48746-9d8bb946",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@fe70126da6063c29ca161cdec7ad1dae9af836b3"
},
{
"signature_version": "v1",
"digest": {
"line_hashes": [
"326396055330571676674294940637522257709",
"30591010309697943116852114970414062326",
"6017155596064216202897350582491596815",
"51355444299964547200196364194942435969",
"258510147694526802589187021679688100163",
"168292945512831937388822146692729398869",
"336996863316251444192501421526324286722",
"39761183667390724906021132773067401001",
"128373624775011545742155564306275327406",
"130003900647709499917493198098329110068",
"153189616272412512784342177487047351774",
"326017094105944669630012190743308316465",
"250236940088756590758267853803564646124",
"55365558609543888706594787070295338658",
"336646257442815854094156917951674250093",
"111831536787349602875962035604967087915",
"106577281090055095696757183993925248430",
"76209733475021507566591585633820840802",
"61579210328490229860259209828804908264",
"312416540603887930120502123978699912454",
"187807407438935760699744523031408995219",
"296986427796673729286253156247814258240",
"171826190964313727551115877752442798260",
"136982669770279113103794700564867677621"
],
"threshold": 0.9
},
"signature_type": "Line",
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/en/rep/bond.c"
},
"deprecated": false,
"id": "CVE-2022-48746-a44232e5",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4fad499d7fece448e7230d5e5b92f6d8a073e0bb"
},
{
"signature_version": "v1",
"digest": {
"function_hash": "160312025035659469487175782620563929804",
"length": 496.0
},
"signature_type": "Function",
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/en/rep/bond.c",
"function": "mlx5e_rep_changeupper_event"
},
"deprecated": false,
"id": "CVE-2022-48746-ad1cf3b6",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@4fad499d7fece448e7230d5e5b92f6d8a073e0bb"
},
{
"signature_version": "v1",
"digest": {
"function_hash": "180569863699703596179381379636234019367",
"length": 236.0
},
"signature_type": "Function",
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/en/rep/bond.c",
"function": "mlx5e_rep_is_lag_netdev"
},
"deprecated": false,
"id": "CVE-2022-48746-af735111",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ec41332e02bd0acf1f24206867bb6a02f5877a62"
},
{
"signature_version": "v1",
"digest": {
"function_hash": "258324735850920146982137521030517913851",
"length": 286.0
},
"signature_type": "Function",
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/en/rep/bond.c",
"function": "mlx5e_rep_esw_bond_netevent"
},
"deprecated": false,
"id": "CVE-2022-48746-b3ecc0a4",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@fe70126da6063c29ca161cdec7ad1dae9af836b3"
},
{
"signature_version": "v1",
"digest": {
"line_hashes": [
"326396055330571676674294940637522257709",
"30591010309697943116852114970414062326",
"6017155596064216202897350582491596815",
"51355444299964547200196364194942435969",
"258510147694526802589187021679688100163",
"168292945512831937388822146692729398869",
"336996863316251444192501421526324286722",
"39761183667390724906021132773067401001",
"128373624775011545742155564306275327406",
"130003900647709499917493198098329110068",
"153189616272412512784342177487047351774",
"326017094105944669630012190743308316465",
"250236940088756590758267853803564646124",
"55365558609543888706594787070295338658",
"336646257442815854094156917951674250093",
"111831536787349602875962035604967087915",
"106577281090055095696757183993925248430",
"76209733475021507566591585633820840802",
"61579210328490229860259209828804908264",
"312416540603887930120502123978699912454",
"187807407438935760699744523031408995219",
"296986427796673729286253156247814258240",
"171826190964313727551115877752442798260",
"136982669770279113103794700564867677621"
],
"threshold": 0.9
},
"signature_type": "Line",
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/en/rep/bond.c"
},
"deprecated": false,
"id": "CVE-2022-48746-c5609cd4",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@fe70126da6063c29ca161cdec7ad1dae9af836b3"
},
{
"signature_version": "v1",
"digest": {
"function_hash": "326491430856907330068348677594132237436",
"length": 1021.0
},
"signature_type": "Function",
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/en/rep/bond.c",
"function": "mlx5e_rep_changelowerstate_event"
},
"deprecated": false,
"id": "CVE-2022-48746-e21176ee",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@a01ee1b8165f4161459b5ec4e728bc7130fe8cd4"
}
]