In the Linux kernel, the following vulnerability has been resolved:
EDAC/thunderx: Fix possible out-of-bounds string access
Enabling -Wstringop-overflow globally exposes a warning for a common bug in the usage of strncat():
drivers/edac/thunderxedac.c: In function 'thunderxocxcomthreadedisr': drivers/edac/thunderxedac.c:1136:17: error: 'strncat' specified bound 1024 equals destination size [-Werror=stringop-overflow=] 1136 | strncat(msg, other, OCXMESSAGESIZE); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ... 1145 | strncat(msg, other, OCXMESSAGESIZE); ... 1150 | strncat(msg, other, OCXMESSAGESIZE);
...
Apparently the author of this driver expected strncat() to behave the way that strlcat() does, which uses the size of the destination buffer as its third argument rather than the length of the source buffer. The result is that there is no check on the size of the allocated buffer.
Change it to strlcat().
[ bp: Trim compiler output, fixup commit message. ]
[
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"207365305104589202932716952987221854966",
"145044196700031199893636201502543734797",
"237132470028223785766710187414274194963",
"243335095393797150338368003477638396301",
"315670098124461689261714537784690775734",
"168905033017630333889963963271844985929",
"223065763120823421510024338449289971431",
"53433712582653729104457515654452895615",
"230147769027675593043939117157959407631",
"192938060570709009893203285576565734071",
"4098346607425276680209908413087850579",
"325417871726501950217969333957931912336",
"173752905848168885608934695245510922831",
"128599800957846577175620265841341524194",
"125575389402183912650241924880057489248",
"27722903126794767444321817227343455226",
"291731870716209020999773010359365521939",
"269430107397844549670550949331524235120",
"198422245783157150142167672500433524554",
"283820409303842647217988451879706988288"
]
},
"target": {
"file": "drivers/edac/thunderx_edac.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@6aa7865ba7ff7f0ede0035180fb3b9400ceb405a",
"id": "CVE-2023-52464-1bbb35c6",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"207365305104589202932716952987221854966",
"145044196700031199893636201502543734797",
"237132470028223785766710187414274194963",
"243335095393797150338368003477638396301",
"315670098124461689261714537784690775734",
"168905033017630333889963963271844985929",
"223065763120823421510024338449289971431",
"53433712582653729104457515654452895615",
"230147769027675593043939117157959407631",
"192938060570709009893203285576565734071",
"4098346607425276680209908413087850579",
"325417871726501950217969333957931912336",
"173752905848168885608934695245510922831",
"128599800957846577175620265841341524194",
"125575389402183912650241924880057489248",
"27722903126794767444321817227343455226",
"291731870716209020999773010359365521939",
"269430107397844549670550949331524235120",
"198422245783157150142167672500433524554",
"283820409303842647217988451879706988288"
]
},
"target": {
"file": "drivers/edac/thunderx_edac.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9dbac9fdae6e3b411fc4c3fca3bf48f70609c398",
"id": "CVE-2023-52464-4c87dceb",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"207365305104589202932716952987221854966",
"145044196700031199893636201502543734797",
"237132470028223785766710187414274194963",
"243335095393797150338368003477638396301",
"315670098124461689261714537784690775734",
"168905033017630333889963963271844985929",
"223065763120823421510024338449289971431",
"53433712582653729104457515654452895615",
"230147769027675593043939117157959407631",
"192938060570709009893203285576565734071",
"4098346607425276680209908413087850579",
"325417871726501950217969333957931912336",
"173752905848168885608934695245510922831",
"128599800957846577175620265841341524194",
"125575389402183912650241924880057489248",
"27722903126794767444321817227343455226",
"291731870716209020999773010359365521939",
"269430107397844549670550949331524235120",
"198422245783157150142167672500433524554",
"283820409303842647217988451879706988288"
]
},
"target": {
"file": "drivers/edac/thunderx_edac.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@700cf4bead80fac994dcc43ae1ca5d86d8959b21",
"id": "CVE-2023-52464-6ef972fb",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"207365305104589202932716952987221854966",
"145044196700031199893636201502543734797",
"237132470028223785766710187414274194963",
"243335095393797150338368003477638396301",
"315670098124461689261714537784690775734",
"168905033017630333889963963271844985929",
"223065763120823421510024338449289971431",
"53433712582653729104457515654452895615",
"230147769027675593043939117157959407631",
"192938060570709009893203285576565734071",
"4098346607425276680209908413087850579",
"325417871726501950217969333957931912336",
"173752905848168885608934695245510922831",
"128599800957846577175620265841341524194",
"125575389402183912650241924880057489248",
"27722903126794767444321817227343455226",
"291731870716209020999773010359365521939",
"269430107397844549670550949331524235120",
"198422245783157150142167672500433524554",
"283820409303842647217988451879706988288"
]
},
"target": {
"file": "drivers/edac/thunderx_edac.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@426fae93c01dffa379225eb2bd4d3cdc42c6eec5",
"id": "CVE-2023-52464-70aab21c",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"207365305104589202932716952987221854966",
"145044196700031199893636201502543734797",
"237132470028223785766710187414274194963",
"243335095393797150338368003477638396301",
"315670098124461689261714537784690775734",
"168905033017630333889963963271844985929",
"223065763120823421510024338449289971431",
"53433712582653729104457515654452895615",
"230147769027675593043939117157959407631",
"192938060570709009893203285576565734071",
"4098346607425276680209908413087850579",
"325417871726501950217969333957931912336",
"173752905848168885608934695245510922831",
"128599800957846577175620265841341524194",
"125575389402183912650241924880057489248",
"27722903126794767444321817227343455226",
"291731870716209020999773010359365521939",
"269430107397844549670550949331524235120",
"198422245783157150142167672500433524554",
"283820409303842647217988451879706988288"
]
},
"target": {
"file": "drivers/edac/thunderx_edac.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@475c58e1a471e9b873e3e39958c64a2d278275c8",
"id": "CVE-2023-52464-7c11e746",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"207365305104589202932716952987221854966",
"145044196700031199893636201502543734797",
"237132470028223785766710187414274194963",
"243335095393797150338368003477638396301",
"315670098124461689261714537784690775734",
"168905033017630333889963963271844985929",
"223065763120823421510024338449289971431",
"53433712582653729104457515654452895615",
"230147769027675593043939117157959407631",
"192938060570709009893203285576565734071",
"4098346607425276680209908413087850579",
"325417871726501950217969333957931912336",
"173752905848168885608934695245510922831",
"128599800957846577175620265841341524194",
"125575389402183912650241924880057489248",
"27722903126794767444321817227343455226",
"291731870716209020999773010359365521939",
"269430107397844549670550949331524235120",
"198422245783157150142167672500433524554",
"283820409303842647217988451879706988288"
]
},
"target": {
"file": "drivers/edac/thunderx_edac.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e1c86511241588efffaa49556196f09a498d5057",
"id": "CVE-2023-52464-944bd992",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"207365305104589202932716952987221854966",
"145044196700031199893636201502543734797",
"237132470028223785766710187414274194963",
"243335095393797150338368003477638396301",
"315670098124461689261714537784690775734",
"168905033017630333889963963271844985929",
"223065763120823421510024338449289971431",
"53433712582653729104457515654452895615",
"230147769027675593043939117157959407631",
"192938060570709009893203285576565734071",
"4098346607425276680209908413087850579",
"325417871726501950217969333957931912336",
"173752905848168885608934695245510922831",
"128599800957846577175620265841341524194",
"125575389402183912650241924880057489248",
"27722903126794767444321817227343455226",
"291731870716209020999773010359365521939",
"269430107397844549670550949331524235120",
"198422245783157150142167672500433524554",
"283820409303842647217988451879706988288"
]
},
"target": {
"file": "drivers/edac/thunderx_edac.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@71c17ee02538802ceafc830f0736aa35b564e601",
"id": "CVE-2023-52464-95c6f784",
"deprecated": false,
"signature_version": "v1"
},
{
"signature_type": "Line",
"digest": {
"threshold": 0.9,
"line_hashes": [
"207365305104589202932716952987221854966",
"145044196700031199893636201502543734797",
"237132470028223785766710187414274194963",
"243335095393797150338368003477638396301",
"315670098124461689261714537784690775734",
"168905033017630333889963963271844985929",
"223065763120823421510024338449289971431",
"53433712582653729104457515654452895615",
"230147769027675593043939117157959407631",
"192938060570709009893203285576565734071",
"4098346607425276680209908413087850579",
"325417871726501950217969333957931912336",
"173752905848168885608934695245510922831",
"128599800957846577175620265841341524194",
"125575389402183912650241924880057489248",
"27722903126794767444321817227343455226",
"291731870716209020999773010359365521939",
"269430107397844549670550949331524235120",
"198422245783157150142167672500433524554",
"283820409303842647217988451879706988288"
]
},
"target": {
"file": "drivers/edac/thunderx_edac.c"
},
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@5da3b6e7196f0b4f3728e4e25eb20233a9ddfaf6",
"id": "CVE-2023-52464-ae901bcb",
"deprecated": false,
"signature_version": "v1"
}
]