diff options
| author | Ben Cressey <ben@cressey.dev> | 2026-09-15 00:37:35 +0000 |
|---|---|---|
| committer | Mikulas Patocka <mpatocka@redhat.com> | 2026-09-21 13:44:41 +0200 |
| commit | 764b683a6180fd72c931c13fea98d383506a3475 (patch) | |
| tree | 2c32fd9d3e333c579330fee3cc75d46e0c78852b /tools/lib/python/kdoc/python_version.py | |
| parent | 93f51579e7df248780214094418f205253383cc5 (diff) | |
| download | linux-next-764b683a6180fd72c931c13fea98d383506a3475.tar.gz linux-next-764b683a6180fd72c931c13fea98d383506a3475.zip | |
dm-integrity: fix buffer overflow in inline mode with large tag size
In inline mode, dm_integrity_check and dm_integrity_inline_recheck
compute the checksum of each block into an on-stack buffer of
HASH_MAX_DIGESTSIZE bytes. integrity_sector_checksum pads its result
with zeroes up to the tag size, so if the tag size is larger than
HASH_MAX_DIGESTSIZE, the padding runs past the end of the buffer. With
CONFIG_STACKPROTECTOR the kernel panics in dm_integrity_check on the
first read.
Enlarge both buffers to hold MAX_TAG_SIZE bytes, as commit b93b6643e9b5
("dm integrity: fix a crash with unusually large tag size") did for
integrity_metadata.
Note that this is not a security bug because the buffer overflow can only
be triggered by root.
Fixes: fb0987682c62 ("dm-integrity: introduce the Inline mode")
Cc: stable@vger.kernel.org
Signed-off-by: Ben Cressey <ben@cressey.dev>
Assisted-by: LLM
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
Diffstat (limited to 'tools/lib/python/kdoc/python_version.py')
0 files changed, 0 insertions, 0 deletions
