efi/libstub: Don't parse overlong command lines
authorArvind Sankar <nivedita@alum.mit.edu>
Thu, 21 May 2020 00:29:21 +0000 (20:29 -0400)
committerArd Biesheuvel <ardb@kernel.org>
Fri, 22 May 2020 14:50:03 +0000 (16:50 +0200)
commit80b1bfe1cb2f20225fb2d8f11d44af4a9d765396
treecd6f70557c1fe4a91be370bb79c8df837a9487ad
parent04b24409b42a9fcae2379a6ddcf9c827b9af7a45
efi/libstub: Don't parse overlong command lines

Check if the command line passed in is larger than COMMAND_LINE_SIZE,
and truncate it to the last full argument if so.

Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Link: https://lore.kernel.org/r/20200521002921.69650-1-nivedita@alum.mit.edu
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
drivers/firmware/efi/libstub/efi-stub-helper.c