mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-11 12:28:41 +08:00
39049b69ec
The new Merkle tree construction algorithm is a bit fragile in that it
may overflow the 'root_hash' array if the tree actually generated does
not match the calculated tree parameters.
This should never happen unless there is a filesystem bug that allows
the file size to change despite deny_write_access(), or a bug in the
Merkle tree logic itself. Regardless, it's fairly easy to check for
buffer overflow here, so let's do so.
This is a robustness improvement only; this case is not currently known
to be reachable. I've added a Fixes tag anyway, since I recommend that
this be included in kernels that have the mentioned commit.
Fixes:
|
||
---|---|---|
.. | ||
enable.c | ||
fsverity_private.h | ||
hash_algs.c | ||
init.c | ||
Kconfig | ||
Makefile | ||
measure.c | ||
open.c | ||
read_metadata.c | ||
signature.c | ||
verify.c |