]> git.baikalelectronics.ru Git - kernel.git/commit
LoadPin: Require file with verity root digests to have a header
authorMatthias Kaehlcke <mka@chromium.org>
Wed, 7 Sep 2022 01:18:12 +0000 (18:18 -0700)
committerKees Cook <keescook@chromium.org>
Wed, 7 Sep 2022 23:37:27 +0000 (16:37 -0700)
commitc044ecc86b0255ddc4efaca345b2988d516bf4f4
tree447a9e122ce9d58599900258a3e31ba1850d932d
parent4b7fbad4a3e029f2dbd2eb828e08511b0c4fafb0
LoadPin: Require file with verity root digests to have a header

LoadPin expects the file with trusted verity root digests to be
an ASCII file with one digest (hex value) per line. A pinned
root could contain files that meet these format requirements,
even though the hex values don't represent trusted root
digests.

Add a new requirement to the file format which consists in
the first line containing a fixed string. This prevents
attackers from feeding files with an otherwise valid format
to LoadPin.

Suggested-by: Sarthak Kukreti <sarthakkukreti@chromium.org>
Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20220906181725.1.I3f51d1bb0014e5a5951be4ad3c5ad7c7ca1dfc32@changeid
security/loadpin/Kconfig
security/loadpin/loadpin.c