In the Linux kernel, the following vulnerability has been resolved:
net/mlx5: Register devlink first under devlink lock
In case device is having a non fatal FW error during probe, the driver will report the error to user via devlink. This will trigger a WARNON, since mlx5 is calling devlinkregister() last. In order to avoid the WARNON[1], change mlx5 to invoke devlregister() first under devlink lock.
[1] WARNING: CPU: 5 PID: 227 at net/devlink/health.c:483 devlinkrecovernotify.constprop.0+0xb8/0xc0 CPU: 5 PID: 227 Comm: kworker/u16:3 Not tainted 6.4.0-rc5forupstreammindebug202306121238 #1 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS rel-1.13.0-0-gf21b5a4aeb02-prebuilt.qemu.org 04/01/2014 Workqueue: mlx5health0000:08:00.0 mlx5fwreportererrwork [mlx5core] RIP: 0010:devlinkrecovernotify.constprop.0+0xb8/0xc0 Call Trace: <TASK> ? _warn+0x79/0x120 ? devlinkrecovernotify.constprop.0+0xb8/0xc0 ? reportbug+0x17c/0x190 ? handlebug+0x3c/0x60 ? excinvalidop+0x14/0x70 ? asmexcinvalidop+0x16/0x20 ? devlinkrecovernotify.constprop.0+0xb8/0xc0 devlinkhealthreport+0x4a/0x1c0 mlx5fwreportererrwork+0xa4/0xd0 [mlx5core] processonework+0x1bb/0x3c0 ? processonework+0x3c0/0x3c0 workerthread+0x4d/0x3c0 ? processonework+0x3c0/0x3c0 kthread+0xc6/0xf0 ? kthreadcompleteandexit+0x20/0x20 retfromfork+0x1f/0x30 </TASK>
[
{
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/sf/dev/driver.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"144887898395831217660835498874243868262",
"261687943299754276549039084283700516547",
"163370201215457137004248205859646602528",
"57551635726725665815044050396559274831"
]
},
"id": "CVE-2024-35961-1a10ea80",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8c91c60858473731bcdaf04fda99fcbcf84420d4",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/sf/dev/driver.c",
"function": "mlx5_sf_dev_remove"
},
"digest": {
"length": 422.0,
"function_hash": "13042547878356606342622318656065774056"
},
"id": "CVE-2024-35961-2f637097",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8c91c60858473731bcdaf04fda99fcbcf84420d4",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/sf/dev/driver.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"144887898395831217660835498874243868262",
"261687943299754276549039084283700516547",
"163370201215457137004248205859646602528",
"57551635726725665815044050396559274831"
]
},
"id": "CVE-2024-35961-492c7c51",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c6e77aa9dd82bc18a89bf49418f8f7e961cfccc8",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/main.c",
"function": "mlx5_uninit_one_light"
},
"digest": {
"length": 226.0,
"function_hash": "69981800893651442452021249917827072713"
},
"id": "CVE-2024-35961-52116512",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c6e77aa9dd82bc18a89bf49418f8f7e961cfccc8",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/main.c",
"function": "mlx5_init_one_light"
},
"digest": {
"length": 736.0,
"function_hash": "85562788157254789526609495919344266043"
},
"id": "CVE-2024-35961-5495f578",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8c91c60858473731bcdaf04fda99fcbcf84420d4",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/main.c",
"function": "mlx5_uninit_one"
},
"digest": {
"length": 594.0,
"function_hash": "206115100244867558313905780540142284524"
},
"id": "CVE-2024-35961-5a21de11",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c6e77aa9dd82bc18a89bf49418f8f7e961cfccc8",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/main.c",
"function": "remove_one"
},
"digest": {
"length": 405.0,
"function_hash": "255581491463418945301970956790240792253"
},
"id": "CVE-2024-35961-612f2af3",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8c91c60858473731bcdaf04fda99fcbcf84420d4",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/main.c",
"function": "mlx5_init_one_light"
},
"digest": {
"length": 736.0,
"function_hash": "85562788157254789526609495919344266043"
},
"id": "CVE-2024-35961-669f6e7a",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@967caa3d37c078e5b95a32094657e6a4cad145f0",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/sf/dev/driver.c",
"function": "mlx5_sf_dev_remove"
},
"digest": {
"length": 422.0,
"function_hash": "13042547878356606342622318656065774056"
},
"id": "CVE-2024-35961-6cf0e58e",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c6e77aa9dd82bc18a89bf49418f8f7e961cfccc8",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/main.c",
"function": "mlx5_init_one_light"
},
"digest": {
"length": 736.0,
"function_hash": "85562788157254789526609495919344266043"
},
"id": "CVE-2024-35961-6e30a906",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c6e77aa9dd82bc18a89bf49418f8f7e961cfccc8",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/main.c",
"function": "mlx5_init_one_devl_locked"
},
"digest": {
"length": 1091.0,
"function_hash": "326642234492755867979680439095682278635"
},
"id": "CVE-2024-35961-70d0f092",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@967caa3d37c078e5b95a32094657e6a4cad145f0",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/main.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"318655468019715155857435567004786290400",
"59062953636900487631825391708085341268",
"45090308287860149009348899758029596107",
"288598281081474647750258783542524249905",
"226969464630165705978398047970206907805",
"153432743991506260538083741330961764955",
"148285174805375050571756270454977219398",
"106915350822731475432357568703335631955",
"209250367931587469811110415666980021546",
"180347304580688595178395445464280012213",
"121207118826507995170097969948905053530",
"129007183768613833949483705660896831594",
"287910197193484260994169017047802510665",
"270592821265100935087562455556305355307",
"319296892257007468565028198060980156788",
"40492528607021149608418994310473650872",
"143727939600129541547035286933709321940",
"195074351770931567555576122250634000241",
"205428147969699768567825531343621574660",
"156520127933219683855275792600778461888",
"99724131774847762413486990099665744947",
"67399975064477308519234349988001389161",
"89697546295721080394442116831452482750",
"93621639193384590728800927593031426187",
"256599225803693749022689210427545889042",
"228827474360714269982792094801762841580",
"324747422968129261213545355999549657079",
"128490267851236392139871440887779076881",
"129630445586212603626755599341259292816",
"334417685093155953817514885277536018564",
"107847505933201578008494179756231360779",
"258080542803924081448694025911174631249",
"289607144132505190584080206242913241890",
"312939084320322530763198578503607149338",
"233858524513485651785683023547736556679",
"90684875144801157486093929250636629435",
"119987324088661790987109276068929856008",
"54500938659971455661630440357226998164",
"310224068646065537706673980281493204224",
"272974908546412692789442276106386790044",
"25897103475406929175821501823105188317",
"219674527541168327332113020671778441858",
"9635495513762777720727624994988280158",
"302047034598887958685738047248863465609",
"329602664838799840680427598810231649017",
"19040960152699797880378953169893276410",
"181465474727864891234619940219292390927",
"87996057571535318960313697625915050773",
"41844539320257702392116838135349393413",
"18229284008929585327397345457887938005",
"276737104870459783091687274135478324481"
]
},
"id": "CVE-2024-35961-71e5807b",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@967caa3d37c078e5b95a32094657e6a4cad145f0",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/main.c",
"function": "mlx5_uninit_one_light"
},
"digest": {
"length": 226.0,
"function_hash": "69981800893651442452021249917827072713"
},
"id": "CVE-2024-35961-80426d58",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@967caa3d37c078e5b95a32094657e6a4cad145f0",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/main.c",
"function": "remove_one"
},
"digest": {
"length": 405.0,
"function_hash": "255581491463418945301970956790240792253"
},
"id": "CVE-2024-35961-8ebcb710",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c6e77aa9dd82bc18a89bf49418f8f7e961cfccc8",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/main.c",
"function": "probe_one"
},
"digest": {
"length": 1353.0,
"function_hash": "18383364914754073270737518846797237958"
},
"id": "CVE-2024-35961-903a847b",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c6e77aa9dd82bc18a89bf49418f8f7e961cfccc8",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/main.c",
"function": "mlx5_uninit_one_light"
},
"digest": {
"length": 226.0,
"function_hash": "69981800893651442452021249917827072713"
},
"id": "CVE-2024-35961-97e726f5",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8c91c60858473731bcdaf04fda99fcbcf84420d4",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/main.c",
"function": "mlx5_init_one_devl_locked"
},
"digest": {
"length": 1091.0,
"function_hash": "326642234492755867979680439095682278635"
},
"id": "CVE-2024-35961-9bd0dd6f",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8c91c60858473731bcdaf04fda99fcbcf84420d4",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/main.c",
"function": "mlx5_uninit_one"
},
"digest": {
"length": 594.0,
"function_hash": "206115100244867558313905780540142284524"
},
"id": "CVE-2024-35961-a62d5889",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@967caa3d37c078e5b95a32094657e6a4cad145f0",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/sf/dev/driver.c",
"function": "mlx5_sf_dev_remove"
},
"digest": {
"length": 422.0,
"function_hash": "13042547878356606342622318656065774056"
},
"id": "CVE-2024-35961-acbc5411",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@967caa3d37c078e5b95a32094657e6a4cad145f0",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/main.c",
"function": "mlx5_init_one"
},
"digest": {
"length": 161.0,
"function_hash": "229195418766850610042248665622708853323"
},
"id": "CVE-2024-35961-accb267f",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c6e77aa9dd82bc18a89bf49418f8f7e961cfccc8",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/main.c",
"function": "mlx5_init_one"
},
"digest": {
"length": 161.0,
"function_hash": "229195418766850610042248665622708853323"
},
"id": "CVE-2024-35961-b4bc03e7",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@967caa3d37c078e5b95a32094657e6a4cad145f0",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/main.c",
"function": "remove_one"
},
"digest": {
"length": 405.0,
"function_hash": "255581491463418945301970956790240792253"
},
"id": "CVE-2024-35961-bcd4988b",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@967caa3d37c078e5b95a32094657e6a4cad145f0",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/main.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"318655468019715155857435567004786290400",
"59062953636900487631825391708085341268",
"45090308287860149009348899758029596107",
"288598281081474647750258783542524249905",
"226969464630165705978398047970206907805",
"153432743991506260538083741330961764955",
"148285174805375050571756270454977219398",
"106915350822731475432357568703335631955",
"209250367931587469811110415666980021546",
"180347304580688595178395445464280012213",
"121207118826507995170097969948905053530",
"129007183768613833949483705660896831594",
"287910197193484260994169017047802510665",
"270592821265100935087562455556305355307",
"319296892257007468565028198060980156788",
"40492528607021149608418994310473650872",
"143727939600129541547035286933709321940",
"195074351770931567555576122250634000241",
"205428147969699768567825531343621574660",
"156520127933219683855275792600778461888",
"99724131774847762413486990099665744947",
"67399975064477308519234349988001389161",
"89697546295721080394442116831452482750",
"93621639193384590728800927593031426187",
"256599225803693749022689210427545889042",
"228827474360714269982792094801762841580",
"324747422968129261213545355999549657079",
"128490267851236392139871440887779076881",
"129630445586212603626755599341259292816",
"334417685093155953817514885277536018564",
"107847505933201578008494179756231360779",
"258080542803924081448694025911174631249",
"289607144132505190584080206242913241890",
"312939084320322530763198578503607149338",
"233858524513485651785683023547736556679",
"90684875144801157486093929250636629435",
"119987324088661790987109276068929856008",
"54500938659971455661630440357226998164",
"310224068646065537706673980281493204224",
"272974908546412692789442276106386790044",
"25897103475406929175821501823105188317",
"219674527541168327332113020671778441858",
"9635495513762777720727624994988280158",
"302047034598887958685738047248863465609",
"329602664838799840680427598810231649017",
"19040960152699797880378953169893276410",
"181465474727864891234619940219292390927",
"87996057571535318960313697625915050773",
"41844539320257702392116838135349393413",
"18229284008929585327397345457887938005",
"276737104870459783091687274135478324481"
]
},
"id": "CVE-2024-35961-d0ee28c9",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8c91c60858473731bcdaf04fda99fcbcf84420d4",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/main.c",
"function": "probe_one"
},
"digest": {
"length": 1353.0,
"function_hash": "18383364914754073270737518846797237958"
},
"id": "CVE-2024-35961-d31f5201",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8c91c60858473731bcdaf04fda99fcbcf84420d4",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/main.c",
"function": "mlx5_init_one_devl_locked"
},
"digest": {
"length": 1091.0,
"function_hash": "326642234492755867979680439095682278635"
},
"id": "CVE-2024-35961-d3a4ad89",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c6e77aa9dd82bc18a89bf49418f8f7e961cfccc8",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/main.c",
"function": "mlx5_init_one"
},
"digest": {
"length": 161.0,
"function_hash": "229195418766850610042248665622708853323"
},
"id": "CVE-2024-35961-dda98526",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8c91c60858473731bcdaf04fda99fcbcf84420d4",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/main.c",
"function": "probe_one"
},
"digest": {
"length": 1353.0,
"function_hash": "18383364914754073270737518846797237958"
},
"id": "CVE-2024-35961-e19910ac",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@967caa3d37c078e5b95a32094657e6a4cad145f0",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/sf/dev/driver.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"144887898395831217660835498874243868262",
"261687943299754276549039084283700516547",
"163370201215457137004248205859646602528",
"57551635726725665815044050396559274831"
]
},
"id": "CVE-2024-35961-e2d635dc",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@967caa3d37c078e5b95a32094657e6a4cad145f0",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/main.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"318655468019715155857435567004786290400",
"59062953636900487631825391708085341268",
"45090308287860149009348899758029596107",
"288598281081474647750258783542524249905",
"226969464630165705978398047970206907805",
"153432743991506260538083741330961764955",
"148285174805375050571756270454977219398",
"106915350822731475432357568703335631955",
"209250367931587469811110415666980021546",
"180347304580688595178395445464280012213",
"121207118826507995170097969948905053530",
"129007183768613833949483705660896831594",
"287910197193484260994169017047802510665",
"270592821265100935087562455556305355307",
"319296892257007468565028198060980156788",
"40492528607021149608418994310473650872",
"143727939600129541547035286933709321940",
"195074351770931567555576122250634000241",
"205428147969699768567825531343621574660",
"156520127933219683855275792600778461888",
"99724131774847762413486990099665744947",
"67399975064477308519234349988001389161",
"89697546295721080394442116831452482750",
"93621639193384590728800927593031426187",
"256599225803693749022689210427545889042",
"228827474360714269982792094801762841580",
"324747422968129261213545355999549657079",
"128490267851236392139871440887779076881",
"129630445586212603626755599341259292816",
"334417685093155953817514885277536018564",
"107847505933201578008494179756231360779",
"258080542803924081448694025911174631249",
"289607144132505190584080206242913241890",
"312939084320322530763198578503607149338",
"233858524513485651785683023547736556679",
"90684875144801157486093929250636629435",
"119987324088661790987109276068929856008",
"54500938659971455661630440357226998164",
"310224068646065537706673980281493204224",
"272974908546412692789442276106386790044",
"25897103475406929175821501823105188317",
"219674527541168327332113020671778441858",
"9635495513762777720727624994988280158",
"302047034598887958685738047248863465609",
"329602664838799840680427598810231649017",
"19040960152699797880378953169893276410",
"181465474727864891234619940219292390927",
"87996057571535318960313697625915050773",
"41844539320257702392116838135349393413",
"18229284008929585327397345457887938005",
"276737104870459783091687274135478324481"
]
},
"id": "CVE-2024-35961-eb36d0ee",
"signature_type": "Line",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c6e77aa9dd82bc18a89bf49418f8f7e961cfccc8",
"signature_version": "v1"
},
{
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/main.c",
"function": "mlx5_uninit_one"
},
"digest": {
"length": 594.0,
"function_hash": "206115100244867558313905780540142284524"
},
"id": "CVE-2024-35961-f0ee988a",
"signature_type": "Function",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@8c91c60858473731bcdaf04fda99fcbcf84420d4",
"signature_version": "v1"
}
]