In the Linux kernel, the following vulnerability has been resolved:
bna: adjust 'name' buf size of bnatcb and bnaccb structures
To have enough space to write all possible sprintf() args. Currently 'name' size is 16, but the first '%s' specifier may already need at least 16 characters, since 'bnad->netdev->name' is used there.
For '%d' specifiers, assume that they require: * 1 char for 'txid + txinfo->tcb[i]->id' sum, BNADMAXTXQPERTX is 8 * 2 chars for 'rxid + rxinfo->rxctrl[i].ccb->id', BNADMAXRXPPER_RX is 16
And replace sprintf with snprintf.
Detected using the static analysis tool - Svace.
[
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/brocade/bna/bnad.c"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c90b1cd7758fd4839909e838ae195d19f8065d76",
"digest": {
"line_hashes": [
"32800891520342458760817026720874740480",
"174431318495385756047126165926388152497",
"25595892819267039729304265979450869309",
"146451474361230846014676151509256847869",
"133742558830626140691102293388571639071",
"99564220888823189633011027053652995600",
"130645415521373144363505471373602186571",
"203427850315591005506478978317015337860",
"41736956954103567800355748811906559277",
"160185213115449827513101361160953024426",
"245844086802396315173490571912438355059"
],
"threshold": 0.9
},
"id": "CVE-2024-43839-03473d86"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/brocade/bna/bnad.c",
"function": "bnad_rx_msix_register"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6d20c4044ab4d0e6a99aa35853e66f0aed5589e3",
"digest": {
"length": 645.0,
"function_hash": "62571960425497321866293274252711558583"
},
"id": "CVE-2024-43839-1b151016"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/brocade/bna/bnad.c",
"function": "bnad_tx_msix_register"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c9741a03dc8e491e57b95fba0058ab46b7e506da",
"digest": {
"length": 596.0,
"function_hash": "202007956091861274162403708338970124345"
},
"id": "CVE-2024-43839-203c25da"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/brocade/bna/bnad.c",
"function": "bnad_rx_msix_register"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ab748dd10d8742561f2980fea08ffb4f0cacfdef",
"digest": {
"length": 645.0,
"function_hash": "62571960425497321866293274252711558583"
},
"id": "CVE-2024-43839-24aaa795"
},
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/brocade/bna/bnad.c"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f121740f69eda4da2de9a20a6687a13593e72540",
"digest": {
"line_hashes": [
"32800891520342458760817026720874740480",
"174431318495385756047126165926388152497",
"25595892819267039729304265979450869309",
"146451474361230846014676151509256847869",
"133742558830626140691102293388571639071",
"99564220888823189633011027053652995600",
"130645415521373144363505471373602186571",
"203427850315591005506478978317015337860",
"41736956954103567800355748811906559277",
"160185213115449827513101361160953024426",
"245844086802396315173490571912438355059"
],
"threshold": 0.9
},
"id": "CVE-2024-43839-27dfc9db"
},
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/brocade/bna/bnad.c"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ab748dd10d8742561f2980fea08ffb4f0cacfdef",
"digest": {
"line_hashes": [
"32800891520342458760817026720874740480",
"174431318495385756047126165926388152497",
"25595892819267039729304265979450869309",
"146451474361230846014676151509256847869",
"133742558830626140691102293388571639071",
"99564220888823189633011027053652995600",
"130645415521373144363505471373602186571",
"203427850315591005506478978317015337860",
"41736956954103567800355748811906559277",
"160185213115449827513101361160953024426",
"245844086802396315173490571912438355059"
],
"threshold": 0.9
},
"id": "CVE-2024-43839-40abc282"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/brocade/bna/bnad.c",
"function": "bnad_tx_msix_register"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e0f48f51d55fb187400e9787192eda09fa200ff5",
"digest": {
"length": 596.0,
"function_hash": "202007956091861274162403708338970124345"
},
"id": "CVE-2024-43839-41590ddc"
},
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/brocade/bna/bnad.c"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6d20c4044ab4d0e6a99aa35853e66f0aed5589e3",
"digest": {
"line_hashes": [
"32800891520342458760817026720874740480",
"174431318495385756047126165926388152497",
"25595892819267039729304265979450869309",
"146451474361230846014676151509256847869",
"133742558830626140691102293388571639071",
"99564220888823189633011027053652995600",
"130645415521373144363505471373602186571",
"203427850315591005506478978317015337860",
"41736956954103567800355748811906559277",
"160185213115449827513101361160953024426",
"245844086802396315173490571912438355059"
],
"threshold": 0.9
},
"id": "CVE-2024-43839-47286a3b"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/brocade/bna/bnad.c",
"function": "bnad_rx_msix_register"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e0f48f51d55fb187400e9787192eda09fa200ff5",
"digest": {
"length": 645.0,
"function_hash": "62571960425497321866293274252711558583"
},
"id": "CVE-2024-43839-4a0b989b"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/brocade/bna/bnad.c",
"function": "bnad_rx_msix_register"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c90b1cd7758fd4839909e838ae195d19f8065d76",
"digest": {
"length": 645.0,
"function_hash": "62571960425497321866293274252711558583"
},
"id": "CVE-2024-43839-4f50a01e"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/brocade/bna/bnad.c",
"function": "bnad_tx_msix_register"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f121740f69eda4da2de9a20a6687a13593e72540",
"digest": {
"length": 596.0,
"function_hash": "202007956091861274162403708338970124345"
},
"id": "CVE-2024-43839-62783989"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/brocade/bna/bnad.c",
"function": "bnad_tx_msix_register"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6d20c4044ab4d0e6a99aa35853e66f0aed5589e3",
"digest": {
"length": 596.0,
"function_hash": "202007956091861274162403708338970124345"
},
"id": "CVE-2024-43839-662bf5e2"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/brocade/bna/bnad.c",
"function": "bnad_tx_msix_register"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c90b1cd7758fd4839909e838ae195d19f8065d76",
"digest": {
"length": 596.0,
"function_hash": "202007956091861274162403708338970124345"
},
"id": "CVE-2024-43839-668071fb"
},
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/brocade/bna/bnad.c"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c9741a03dc8e491e57b95fba0058ab46b7e506da",
"digest": {
"line_hashes": [
"32800891520342458760817026720874740480",
"174431318495385756047126165926388152497",
"25595892819267039729304265979450869309",
"146451474361230846014676151509256847869",
"133742558830626140691102293388571639071",
"99564220888823189633011027053652995600",
"130645415521373144363505471373602186571",
"203427850315591005506478978317015337860",
"41736956954103567800355748811906559277",
"160185213115449827513101361160953024426",
"245844086802396315173490571912438355059"
],
"threshold": 0.9
},
"id": "CVE-2024-43839-6873ed6b"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/brocade/bna/bnad.c",
"function": "bnad_rx_msix_register"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@f121740f69eda4da2de9a20a6687a13593e72540",
"digest": {
"length": 645.0,
"function_hash": "62571960425497321866293274252711558583"
},
"id": "CVE-2024-43839-6f86fdb2"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/brocade/bna/bnad.c",
"function": "bnad_rx_msix_register"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b0ff0cd0847b03c0a0abe20cfa900eabcfcb9e43",
"digest": {
"length": 645.0,
"function_hash": "62571960425497321866293274252711558583"
},
"id": "CVE-2024-43839-80e68c59"
},
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/brocade/bna/bnad.c"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e0f48f51d55fb187400e9787192eda09fa200ff5",
"digest": {
"line_hashes": [
"32800891520342458760817026720874740480",
"174431318495385756047126165926388152497",
"25595892819267039729304265979450869309",
"146451474361230846014676151509256847869",
"133742558830626140691102293388571639071",
"99564220888823189633011027053652995600",
"130645415521373144363505471373602186571",
"203427850315591005506478978317015337860",
"41736956954103567800355748811906559277",
"160185213115449827513101361160953024426",
"245844086802396315173490571912438355059"
],
"threshold": 0.9
},
"id": "CVE-2024-43839-a95518b7"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/brocade/bna/bnad.c",
"function": "bnad_tx_msix_register"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b0ff0cd0847b03c0a0abe20cfa900eabcfcb9e43",
"digest": {
"length": 596.0,
"function_hash": "202007956091861274162403708338970124345"
},
"id": "CVE-2024-43839-b261ad20"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/brocade/bna/bnad.c",
"function": "bnad_rx_msix_register"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@c9741a03dc8e491e57b95fba0058ab46b7e506da",
"digest": {
"length": 645.0,
"function_hash": "62571960425497321866293274252711558583"
},
"id": "CVE-2024-43839-bc37bc33"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/brocade/bna/bnad.c",
"function": "bnad_rx_msix_register"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6ce46045f9b90d952602e2c0b8886cfadf860bf1",
"digest": {
"length": 645.0,
"function_hash": "62571960425497321866293274252711558583"
},
"id": "CVE-2024-43839-c0ea1c47"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/brocade/bna/bnad.c",
"function": "bnad_tx_msix_register"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6ce46045f9b90d952602e2c0b8886cfadf860bf1",
"digest": {
"length": 596.0,
"function_hash": "202007956091861274162403708338970124345"
},
"id": "CVE-2024-43839-c8167a93"
},
{
"signature_type": "Function",
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/brocade/bna/bnad.c",
"function": "bnad_tx_msix_register"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@ab748dd10d8742561f2980fea08ffb4f0cacfdef",
"digest": {
"length": 596.0,
"function_hash": "202007956091861274162403708338970124345"
},
"id": "CVE-2024-43839-ce585969"
},
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/brocade/bna/bnad.c"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@b0ff0cd0847b03c0a0abe20cfa900eabcfcb9e43",
"digest": {
"line_hashes": [
"32800891520342458760817026720874740480",
"174431318495385756047126165926388152497",
"25595892819267039729304265979450869309",
"146451474361230846014676151509256847869",
"133742558830626140691102293388571639071",
"99564220888823189633011027053652995600",
"130645415521373144363505471373602186571",
"203427850315591005506478978317015337860",
"41736956954103567800355748811906559277",
"160185213115449827513101361160953024426",
"245844086802396315173490571912438355059"
],
"threshold": 0.9
},
"id": "CVE-2024-43839-cf4e5264"
},
{
"signature_type": "Line",
"deprecated": false,
"target": {
"file": "drivers/net/ethernet/brocade/bna/bnad.c"
},
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6ce46045f9b90d952602e2c0b8886cfadf860bf1",
"digest": {
"line_hashes": [
"32800891520342458760817026720874740480",
"174431318495385756047126165926388152497",
"25595892819267039729304265979450869309",
"146451474361230846014676151509256847869",
"133742558830626140691102293388571639071",
"99564220888823189633011027053652995600",
"130645415521373144363505471373602186571",
"203427850315591005506478978317015337860",
"41736956954103567800355748811906559277",
"160185213115449827513101361160953024426",
"245844086802396315173490571912438355059"
],
"threshold": 0.9
},
"id": "CVE-2024-43839-f6425499"
}
]