]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
dm-integrity: limit MAX_TAG_SIZE to 255
authorMikulas Patocka <mpatocka@redhat.com>
Mon, 8 Sep 2025 13:52:02 +0000 (15:52 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 15 Oct 2025 09:56:23 +0000 (11:56 +0200)
commit9eb265e5aaa2fdb5ce37cad54febee5154579f28
tree3097871c30e1187810c362dbb747ab10edecf200
parent49bc40a559836516c3142859458d50039ed9fa40
dm-integrity: limit MAX_TAG_SIZE to 255

[ Upstream commit 77b8e6fbf9848d651f5cb7508f18ad0971f3ffdb ]

MAX_TAG_SIZE was 0x1a8 and it may be truncated in the "bi->metadata_size
= ic->tag_size" assignment. We need to limit it to 255.

Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/md/dm-integrity.c