Skip to content

Commit ef9afd7

Browse files
committed
dm-integrity: limit MAX_TAG_SIZE to 255
JIRA: https://issues.redhat.com/browse/RHEL-119009 Upstream Status: kernel/git/torvalds/linux.git commit 77b8e6f Author: Mikulas Patocka <mpatocka@redhat.com> Date: Mon Sep 8 15:52:02 2025 +0200 dm-integrity: limit MAX_TAG_SIZE to 255 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: Benjamin Marzinski <bmarzins@redhat.com>
1 parent ce3ec15 commit ef9afd7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/md/dm-integrity.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ struct journal_sector {
133133
commit_id_t commit_id;
134134
};
135135

136-
#define MAX_TAG_SIZE (JOURNAL_SECTOR_DATA - JOURNAL_MAC_PER_SECTOR - offsetof(struct journal_entry, last_bytes[MAX_SECTORS_PER_BLOCK]))
136+
#define MAX_TAG_SIZE 255
137137

138138
#define METADATA_PADDING_SECTORS 8
139139

0 commit comments

Comments
 (0)