diff options
author | Mikulas Patocka <mpatocka@redhat.com> | 2024-02-19 23:31:11 +0300 |
---|---|---|
committer | Mike Snitzer <snitzer@kernel.org> | 2024-02-20 21:34:32 +0300 |
commit | 42e15d12070b4ff9af2b980f1b65774c2dab0507 (patch) | |
tree | 4b9f75a15e855dec081f7b81b99f83959a73b0d0 /drivers/md/dm-verity.h | |
parent | 50c70240097ce41fe6bce6478b80478281e4d0f7 (diff) | |
download | linux-42e15d12070b4ff9af2b980f1b65774c2dab0507.tar.xz |
dm-crypt: recheck the integrity tag after a failure
If a userspace process reads (with O_DIRECT) multiple blocks into the same
buffer, dm-crypt reports an authentication error [1]. The error is
reported in a log and it may cause RAID leg being kicked out of the
array.
This commit fixes dm-crypt, so that if integrity verification fails, the
data is read again into a kernel buffer (where userspace can't modify it)
and the integrity tag is rechecked. If the recheck succeeds, the content
of the kernel buffer is copied into the user buffer; if the recheck fails,
an integrity 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 'drivers/md/dm-verity.h')
0 files changed, 0 insertions, 0 deletions