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.