In the Linux kernel, the following vulnerability has been resolved:
net/mlx5: E-switch, Create ingress ACL when needed
Currently, ingress acl is used for three features. It is created only when vport metadata match and prio tag are enabled. But active-backup lag mode also uses it. It is independent of vport metadata match and prio tag. And vport metadata match can be disabled using the following devlink command:
# devlink dev param set pci/0000:08:00.0 name eswportmetadata \ value false cmode runtime
If ingress acl is not created, will hit panic when creating drop rule for active-backup lag mode. If always create it, there will be about 5% performance degradation.
Fix it by creating ingress acl when needed. If eswportmetadata is true, ingress acl exists, then create drop rule using existing ingress acl. If eswportmetadata is false, create ingress acl and then create drop rule.
[
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/esw/acl/ingress_ofld.c",
"function": "esw_acl_ingress_src_port_drop_create"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3e3551f8702978cd2221d2614ca6d6727e785324",
"digest": {
"length": 442.0,
"function_hash": "325006601776650110169287295632238286290"
},
"id": "CVE-2024-42142-0f95219c"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/esw/acl/ingress_ofld.c",
"function": "esw_acl_ingress_src_port_drop_create"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@bc3ff8d3c05044de57865ebbb78cca8f7da3e595",
"digest": {
"length": 442.0,
"function_hash": "325006601776650110169287295632238286290"
},
"id": "CVE-2024-42142-3255ab77"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/esw/acl/ingress_ofld.c",
"function": "esw_acl_ingress_ofld_setup"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@bc3ff8d3c05044de57865ebbb78cca8f7da3e595",
"digest": {
"length": 833.0,
"function_hash": "21191204161646357910054972490057372145"
},
"id": "CVE-2024-42142-3450dd9c"
},
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/esw/acl/ingress_ofld.c"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@bc3ff8d3c05044de57865ebbb78cca8f7da3e595",
"digest": {
"line_hashes": [
"33351442920846663225577037990667422909",
"333066359996248460836443472428573945767",
"306695410382636242024059471247048373596",
"157320683446816334939961841648130730308",
"286402769078596223251698330285638659470",
"305314421443730750967323586282573055044",
"123093605059438553005973919575735972664",
"225320969359100925179367903373493577011",
"278894632901774336586460331306145732924",
"300778312348194928475399700609197951834",
"103455162186633268504931736649471913024",
"241687989276396466134014884579405960212",
"7745651779992194333159294202159211643",
"144837349564846677626655552422284737500",
"138069296204488530521902307905896610418",
"101857252022498396990656890763533971558",
"249715397915753729960512979412164311083",
"291120831399750160941739747258070379674",
"24959310995135167337601713093044222017",
"177771893748604242233861395966172971277",
"157660787602095957097441812812169139142",
"313783136932387777370128977988868959693",
"247706041336482678292122164530095424760",
"250898937744720794643855970490494185756",
"278170404188861750562572223892713064631",
"178579157292760998999749941378434147160",
"273665854618948786820156692815161302675",
"104421257854326925143177026794329917155",
"46331284598401912866443014061951365348",
"167152760335004759539530705097801994657",
"307084181247398712249453291070552383342"
],
"threshold": 0.9
},
"id": "CVE-2024-42142-488d24c4"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/esw/acl/ingress_ofld.c",
"function": "esw_acl_ingress_src_port_drop_create"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@83bc1a129f7fd0d7d05036ceb7ee69102624e320",
"digest": {
"length": 442.0,
"function_hash": "325006601776650110169287295632238286290"
},
"id": "CVE-2024-42142-5eae6077"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/esw/acl/ingress_ofld.c",
"function": "esw_acl_ingress_ofld_setup"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b20c2fb45470d0c7a603613c9cfa5d45720e17f2",
"digest": {
"length": 833.0,
"function_hash": "21191204161646357910054972490057372145"
},
"id": "CVE-2024-42142-60f3b12f"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/esw/acl/ingress_ofld.c",
"function": "esw_acl_ingress_src_port_drop_create"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b20c2fb45470d0c7a603613c9cfa5d45720e17f2",
"digest": {
"length": 442.0,
"function_hash": "325006601776650110169287295632238286290"
},
"id": "CVE-2024-42142-7279b6c2"
},
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/esw/acl/ingress_ofld.c"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3e3551f8702978cd2221d2614ca6d6727e785324",
"digest": {
"line_hashes": [
"33351442920846663225577037990667422909",
"333066359996248460836443472428573945767",
"306695410382636242024059471247048373596",
"157320683446816334939961841648130730308",
"286402769078596223251698330285638659470",
"305314421443730750967323586282573055044",
"123093605059438553005973919575735972664",
"225320969359100925179367903373493577011",
"278894632901774336586460331306145732924",
"300778312348194928475399700609197951834",
"103455162186633268504931736649471913024",
"241687989276396466134014884579405960212",
"7745651779992194333159294202159211643",
"144837349564846677626655552422284737500",
"138069296204488530521902307905896610418",
"101857252022498396990656890763533971558",
"249715397915753729960512979412164311083",
"291120831399750160941739747258070379674",
"24959310995135167337601713093044222017",
"177771893748604242233861395966172971277",
"157660787602095957097441812812169139142",
"313783136932387777370128977988868959693",
"247706041336482678292122164530095424760",
"250898937744720794643855970490494185756",
"278170404188861750562572223892713064631",
"178579157292760998999749941378434147160",
"273665854618948786820156692815161302675",
"104421257854326925143177026794329917155",
"46331284598401912866443014061951365348",
"167152760335004759539530705097801994657",
"307084181247398712249453291070552383342"
],
"threshold": 0.9
},
"id": "CVE-2024-42142-915d1ad5"
},
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/esw/acl/ingress_ofld.c"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@83bc1a129f7fd0d7d05036ceb7ee69102624e320",
"digest": {
"line_hashes": [
"33351442920846663225577037990667422909",
"333066359996248460836443472428573945767",
"306695410382636242024059471247048373596",
"157320683446816334939961841648130730308",
"286402769078596223251698330285638659470",
"305314421443730750967323586282573055044",
"123093605059438553005973919575735972664",
"225320969359100925179367903373493577011",
"278894632901774336586460331306145732924",
"300778312348194928475399700609197951834",
"103455162186633268504931736649471913024",
"241687989276396466134014884579405960212",
"7745651779992194333159294202159211643",
"144837349564846677626655552422284737500",
"138069296204488530521902307905896610418",
"101857252022498396990656890763533971558",
"249715397915753729960512979412164311083",
"291120831399750160941739747258070379674",
"24959310995135167337601713093044222017",
"177771893748604242233861395966172971277",
"157660787602095957097441812812169139142",
"313783136932387777370128977988868959693",
"247706041336482678292122164530095424760",
"250898937744720794643855970490494185756",
"278170404188861750562572223892713064631",
"178579157292760998999749941378434147160",
"273665854618948786820156692815161302675",
"104421257854326925143177026794329917155",
"46331284598401912866443014061951365348",
"167152760335004759539530705097801994657",
"307084181247398712249453291070552383342"
],
"threshold": 0.9
},
"id": "CVE-2024-42142-b313001a"
},
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/esw/acl/ingress_ofld.c"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b20c2fb45470d0c7a603613c9cfa5d45720e17f2",
"digest": {
"line_hashes": [
"33351442920846663225577037990667422909",
"333066359996248460836443472428573945767",
"306695410382636242024059471247048373596",
"157320683446816334939961841648130730308",
"286402769078596223251698330285638659470",
"305314421443730750967323586282573055044",
"123093605059438553005973919575735972664",
"225320969359100925179367903373493577011",
"278894632901774336586460331306145732924",
"300778312348194928475399700609197951834",
"103455162186633268504931736649471913024",
"241687989276396466134014884579405960212",
"7745651779992194333159294202159211643",
"144837349564846677626655552422284737500",
"138069296204488530521902307905896610418",
"101857252022498396990656890763533971558",
"249715397915753729960512979412164311083",
"291120831399750160941739747258070379674",
"24959310995135167337601713093044222017",
"177771893748604242233861395966172971277",
"157660787602095957097441812812169139142",
"313783136932387777370128977988868959693",
"247706041336482678292122164530095424760",
"250898937744720794643855970490494185756",
"278170404188861750562572223892713064631",
"178579157292760998999749941378434147160",
"273665854618948786820156692815161302675",
"104421257854326925143177026794329917155",
"46331284598401912866443014061951365348",
"167152760335004759539530705097801994657",
"307084181247398712249453291070552383342"
],
"threshold": 0.9
},
"id": "CVE-2024-42142-c03b7c16"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/esw/acl/ingress_ofld.c",
"function": "esw_acl_ingress_ofld_setup"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@83bc1a129f7fd0d7d05036ceb7ee69102624e320",
"digest": {
"length": 833.0,
"function_hash": "21191204161646357910054972490057372145"
},
"id": "CVE-2024-42142-c17bf2e4"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/mellanox/mlx5/core/esw/acl/ingress_ofld.c",
"function": "esw_acl_ingress_ofld_setup"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@3e3551f8702978cd2221d2614ca6d6727e785324",
"digest": {
"length": 833.0,
"function_hash": "21191204161646357910054972490057372145"
},
"id": "CVE-2024-42142-c40ee7e0"
}
]