summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMikulas Patocka <mpatocka@redhat.com>2024-02-19 23:28:09 +0300
committerMike Snitzer <snitzer@kernel.org>2024-02-20 21:34:31 +0300
commit9177f3c0dea6143d05cac1bbd28668fd0e216d11 (patch)
treec986c5410d17dad296307c5a3eb8ca673391d173 /include
parentc88f5e553fe38b2ffc4c33d08654e5281b297677 (diff)
downloadlinux-9177f3c0dea6143d05cac1bbd28668fd0e216d11.tar.xz
dm-verity: recheck the hash after a failure
If a userspace process reads (with O_DIRECT) multiple blocks into the same buffer, dm-verity reports an error [1]. This commit fixes dm-verity, so that if hash verification fails, the data is read again into a kernel buffer (where userspace can't modify it) and the hash is rechecked. If the recheck succeeds, the content of the kernel buffer is copied into the user buffer; if the recheck fails, an error is reported. [1] https://people.redhat.com/~mpatocka/testcases/blk-auth-modify/read2.c Signed-off-by: Mikulas Patocka <mpatocka@redhat.com> Cc: stable@vger.kernel.org Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions