In the Linux kernel, the following vulnerability has been resolved:
coresight: Fix memory leak in acpi_buffer->pointer
There are memory leaks reported by kmemleak: ... unreferenced object 0xffff00213c141000 (size 1024): comm "systemd-udevd", pid 2123, jiffies 4294909467 (age 6062.160s) hex dump (first 32 bytes): 04 00 00 00 02 00 00 00 18 10 14 3c 21 00 ff ff ..........._kmemcacheallocnode+0x2f8/0x348 [<00000000b0fc7ceb>] _kmalloc+0x58/0x108 [<0000000064ff4695>] acpiosallocate+0x2c/0x68 [<000000007d57d116>] acpiutinitializebuffer+0x54/0xe0 [<0000000024583908>] acpievaluateobject+0x388/0x438 [<0000000017b2e72b>] acpievaluateobjecttyped+0xe8/0x240 [<000000005df0eac2>] coresightgetplatformdata+0x1b4/0x988 [coresight] ...
The ACPI buffer memory (buf.pointer) should be freed. But the buffer is also used after returning from acpigetdsdgraph(). Move the temporary variables buf to acpicoresightparsegraph(), and free it before the function return to prevent memory leak.
[
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1a9e02673e2550f5612099e64e8761f0c8fc0f50",
"deprecated": false,
"id": "CVE-2023-53261-1ddda1df",
"target": {
"file": "drivers/hwtracing/coresight/coresight-platform.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"102264340853294634646207100895747280818",
"613708813922101668591433091977174481",
"267359535742694257675941308175153002182",
"226906694681950273553214457456869662211",
"118229702778486100337697401260529121163",
"260631699610447207384692725249660593109",
"257308177704054461903389899905388007814",
"52785092245479222475375429992268002756",
"110734130382120677589944563634959198635",
"86745804168061063042969511770767987997",
"312266080577767647439967660351477568021",
"249491630706068960523178147742293234014",
"241231521232236253410370157988280137817",
"156337903722254904826800340588535774091",
"240100925811940405151753529003973998002",
"37060574722464177542639419078805144166",
"281895919373620711753689662382063478367",
"247809655688683098670181253326893199272",
"8588075219367231859878428094083209074",
"50117411140670414970650625498292722755",
"102264084888822215618396990257159797740",
"173061993257169176013824929524903651196",
"98643362609745942494982700746983845289",
"266439970369209457210987740997595867124",
"179321300318949002177280029870895420499",
"178358444323932261048521866036753259706",
"95333053304249945306583954471619262514",
"325631281642662161878560534182707623120",
"97686966448787343284659390024438098719",
"116623044383511810763685787621730709649",
"192124502675447516449874640822271930759",
"116156460036338472616338651013579193944",
"20660596407659439160360287579198092171",
"279548446609102099976628074503560625909",
"187265925085268813554705202049341582326",
"8322143846618011892431974969153188324",
"230848458597687373647627271871461701142",
"305906777502256408699357558933661179340",
"43177875501225824700058558192109427775",
"301610074246231800816065653771774335574",
"48511152201679061953996947200510652573",
"179108261673000017212435744836456405029",
"7661681587169709988435514965066992743",
"40011755064836779970876907426130185138",
"221449358855106261804088120548496296353",
"267868390585593816517915983992887850017",
"40871188566960555797534865343993917120",
"232979034711197183375924348133572260119"
]
},
"signature_type": "Line"
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1a9e02673e2550f5612099e64e8761f0c8fc0f50",
"deprecated": false,
"id": "CVE-2023-53261-555caa2a",
"target": {
"function": "acpi_get_dsd_graph",
"file": "drivers/hwtracing/coresight/coresight-platform.c"
},
"digest": {
"function_hash": "124782674990469070011334595038200743962",
"length": 671.0
},
"signature_type": "Function"
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d1b60e7c9fee34eaedf1fc4e0471f75b33f83a4a",
"deprecated": false,
"id": "CVE-2023-53261-5e5a12bc",
"target": {
"file": "drivers/hwtracing/coresight/coresight-platform.c"
},
"digest": {
"threshold": 0.9,
"line_hashes": [
"102264340853294634646207100895747280818",
"613708813922101668591433091977174481",
"267359535742694257675941308175153002182",
"226906694681950273553214457456869662211",
"118229702778486100337697401260529121163",
"260631699610447207384692725249660593109",
"257308177704054461903389899905388007814",
"52785092245479222475375429992268002756",
"110734130382120677589944563634959198635",
"86745804168061063042969511770767987997",
"312266080577767647439967660351477568021",
"249491630706068960523178147742293234014",
"241231521232236253410370157988280137817",
"156337903722254904826800340588535774091",
"240100925811940405151753529003973998002",
"37060574722464177542639419078805144166",
"281895919373620711753689662382063478367",
"247809655688683098670181253326893199272",
"8588075219367231859878428094083209074",
"50117411140670414970650625498292722755",
"102264084888822215618396990257159797740",
"173061993257169176013824929524903651196",
"98643362609745942494982700746983845289",
"266439970369209457210987740997595867124",
"179321300318949002177280029870895420499",
"178358444323932261048521866036753259706",
"95333053304249945306583954471619262514",
"325631281642662161878560534182707623120",
"97686966448787343284659390024438098719",
"116623044383511810763685787621730709649",
"192124502675447516449874640822271930759",
"116156460036338472616338651013579193944",
"20660596407659439160360287579198092171",
"279548446609102099976628074503560625909",
"187265925085268813554705202049341582326",
"8322143846618011892431974969153188324",
"230848458597687373647627271871461701142",
"305906777502256408699357558933661179340",
"43177875501225824700058558192109427775",
"301610074246231800816065653771774335574",
"48511152201679061953996947200510652573",
"179108261673000017212435744836456405029",
"7661681587169709988435514965066992743",
"40011755064836779970876907426130185138",
"221449358855106261804088120548496296353",
"267868390585593816517915983992887850017",
"40871188566960555797534865343993917120",
"232979034711197183375924348133572260119"
]
},
"signature_type": "Line"
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d1b60e7c9fee34eaedf1fc4e0471f75b33f83a4a",
"deprecated": false,
"id": "CVE-2023-53261-601e71e4",
"target": {
"function": "acpi_get_dsd_graph",
"file": "drivers/hwtracing/coresight/coresight-platform.c"
},
"digest": {
"function_hash": "124782674990469070011334595038200743962",
"length": 671.0
},
"signature_type": "Function"
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d1b60e7c9fee34eaedf1fc4e0471f75b33f83a4a",
"deprecated": false,
"id": "CVE-2023-53261-68a3ff85",
"target": {
"function": "acpi_get_coresight_graph",
"file": "drivers/hwtracing/coresight/coresight-platform.c"
},
"digest": {
"function_hash": "164030163185139438988767480103762012685",
"length": 393.0
},
"signature_type": "Function"
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1a9e02673e2550f5612099e64e8761f0c8fc0f50",
"deprecated": false,
"id": "CVE-2023-53261-85668986",
"target": {
"function": "acpi_coresight_parse_graph",
"file": "drivers/hwtracing/coresight/coresight-platform.c"
},
"digest": {
"function_hash": "335108426007526226243285567046137360235",
"length": 645.0
},
"signature_type": "Function"
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@d1b60e7c9fee34eaedf1fc4e0471f75b33f83a4a",
"deprecated": false,
"id": "CVE-2023-53261-9c076a0b",
"target": {
"function": "acpi_coresight_parse_graph",
"file": "drivers/hwtracing/coresight/coresight-platform.c"
},
"digest": {
"function_hash": "335108426007526226243285567046137360235",
"length": 645.0
},
"signature_type": "Function"
},
{
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@1a9e02673e2550f5612099e64e8761f0c8fc0f50",
"deprecated": false,
"id": "CVE-2023-53261-ec1c171a",
"target": {
"function": "acpi_get_coresight_graph",
"file": "drivers/hwtracing/coresight/coresight-platform.c"
},
"digest": {
"function_hash": "164030163185139438988767480103762012685",
"length": 393.0
},
"signature_type": "Function"
}
]