In the Linux kernel, the following vulnerability has been resolved: efi/libstub: Free correct pointer on failure cmdline_ptr is an out parameter, which is not allocated by the function itself, and likely points into the caller's stack. cmdline refers to the pool allocation that should be freed when cleaning up after a failure, so pass this instead to free_pool().
https://git.kernel.org/stable/c/eaafbcf0a5782ae412ca7de12ef83fc48ccea4cf
https://git.kernel.org/stable/c/d173aee5709bd0994d216d60589ec67f8b11376a
https://git.kernel.org/stable/c/06d39d79cbd5a91a33707951ebf2512d0e759847