In the Linux kernel, the following vulnerability has been resolved:
vdpa: solidrun: Fix UB bug with devres
In psnetopenpfbar() and snetopenvfbar() a string later passed to pcimiomapregions() is placed on the stack. Neither pcimiomapregions() nor the functions it calls copy that string.
Should the string later ever be used, this, consequently, causes undefined behavior since the stack frame will by then have disappeared.
Fix the bug by allocating the strings on the heap through devm_kasprintf().
[
{
"id": "CVE-2024-53126-4191561a",
"deprecated": false,
"signature_version": "v1",
"digest": {
"length": 423.0,
"function_hash": "42313273802749439593676591877905506085"
},
"target": {
"function": "snet_open_vf_bar",
"file": "drivers/vdpa/solidrun/snet_main.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5bb287da2d2d5bb8f7376e223b02edb16998982e",
"signature_type": "Function"
},
{
"id": "CVE-2024-53126-7220fe44",
"deprecated": false,
"signature_version": "v1",
"digest": {
"length": 650.0,
"function_hash": "290078704765893483916674691711111073460"
},
"target": {
"function": "psnet_open_pf_bar",
"file": "drivers/vdpa/solidrun/snet_main.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5bb287da2d2d5bb8f7376e223b02edb16998982e",
"signature_type": "Function"
},
{
"id": "CVE-2024-53126-83d7afcf",
"deprecated": false,
"signature_version": "v1",
"digest": {
"length": 423.0,
"function_hash": "42313273802749439593676591877905506085"
},
"target": {
"function": "snet_open_vf_bar",
"file": "drivers/vdpa/solidrun/snet_main.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d372dd09cfbf1324f54cbffd81fcaf6cdf3e608e",
"signature_type": "Function"
},
{
"id": "CVE-2024-53126-b591869b",
"deprecated": false,
"signature_version": "v1",
"digest": {
"length": 423.0,
"function_hash": "42313273802749439593676591877905506085"
},
"target": {
"function": "snet_open_vf_bar",
"file": "drivers/vdpa/solidrun/snet_main.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0b364cf53b20204e92bac7c6ebd1ee7d3ec62931",
"signature_type": "Function"
},
{
"id": "CVE-2024-53126-c5b6778b",
"deprecated": false,
"signature_version": "v1",
"digest": {
"length": 650.0,
"function_hash": "290078704765893483916674691711111073460"
},
"target": {
"function": "psnet_open_pf_bar",
"file": "drivers/vdpa/solidrun/snet_main.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0b364cf53b20204e92bac7c6ebd1ee7d3ec62931",
"signature_type": "Function"
},
{
"id": "CVE-2024-53126-d1595bb0",
"deprecated": false,
"signature_version": "v1",
"digest": {
"length": 650.0,
"function_hash": "290078704765893483916674691711111073460"
},
"target": {
"function": "psnet_open_pf_bar",
"file": "drivers/vdpa/solidrun/snet_main.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d372dd09cfbf1324f54cbffd81fcaf6cdf3e608e",
"signature_type": "Function"
},
{
"id": "CVE-2024-53126-eac687c1",
"deprecated": false,
"signature_version": "v1",
"digest": {
"line_hashes": [
"297179454641107373601215742713175890271",
"105685254794993428870744488704241269509",
"25056775258939917067600023933062713203",
"96750889093850753686663844463871803999",
"18446121343432371444923402503871703881",
"229008993916084320030687021709999271799",
"162445857704042901083335073368060419699",
"135073101982953424003810715311280154313",
"212339877492905396440806743487726309010",
"83284159826977878720570038696484382669",
"67070448233657223972368447062822416824",
"88227089159912293916644472910592508923",
"113556356979545419013873473908642978920",
"160275818756572498076946106825950755438"
],
"threshold": 0.9
},
"target": {
"file": "drivers/vdpa/solidrun/snet_main.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@0b364cf53b20204e92bac7c6ebd1ee7d3ec62931",
"signature_type": "Line"
},
{
"id": "CVE-2024-53126-edafdb6b",
"deprecated": false,
"signature_version": "v1",
"digest": {
"line_hashes": [
"297179454641107373601215742713175890271",
"105685254794993428870744488704241269509",
"25056775258939917067600023933062713203",
"96750889093850753686663844463871803999",
"18446121343432371444923402503871703881",
"229008993916084320030687021709999271799",
"162445857704042901083335073368060419699",
"135073101982953424003810715311280154313",
"212339877492905396440806743487726309010",
"83284159826977878720570038696484382669",
"67070448233657223972368447062822416824",
"88227089159912293916644472910592508923",
"113556356979545419013873473908642978920",
"160275818756572498076946106825950755438"
],
"threshold": 0.9
},
"target": {
"file": "drivers/vdpa/solidrun/snet_main.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d372dd09cfbf1324f54cbffd81fcaf6cdf3e608e",
"signature_type": "Line"
},
{
"id": "CVE-2024-53126-f45c439e",
"deprecated": false,
"signature_version": "v1",
"digest": {
"line_hashes": [
"297179454641107373601215742713175890271",
"105685254794993428870744488704241269509",
"25056775258939917067600023933062713203",
"96750889093850753686663844463871803999",
"18446121343432371444923402503871703881",
"229008993916084320030687021709999271799",
"162445857704042901083335073368060419699",
"135073101982953424003810715311280154313",
"212339877492905396440806743487726309010",
"83284159826977878720570038696484382669",
"67070448233657223972368447062822416824",
"88227089159912293916644472910592508923",
"113556356979545419013873473908642978920",
"160275818756572498076946106825950755438"
],
"threshold": 0.9
},
"target": {
"file": "drivers/vdpa/solidrun/snet_main.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5bb287da2d2d5bb8f7376e223b02edb16998982e",
"signature_type": "Line"
}
]