Samuel Moelius
a868196f03
dm era: fix out-of-bounds memory access for non-zero start sector
...
dm-era tracks writes in target-relative blocks, but era_map() calculates
the writeset block before applying the target offset. Tables with a
non-zero start sector can therefore pass an absolute mapped-device block
to metadata_current_marked().
If the absolute block is beyond the current writeset size,
writeset_marked() tests past the end of the in-core bitset. KASAN reports
this as a vmalloc-out-of-bounds access.
Apply the target offset before calculating the era block so writeset
lookups use the target-relative block number.
Assisted-by: Codex:gpt-5.5-cyber-preview
Signed-off-by: Samuel Moelius <sam.moelius@trailofbits.com >
Reviewed-by: Ming-Hung Tsai <mtsai@redhat.com >
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com >
Cc: stable@vger.kernel.org
Fixes: eec40579d8 ("dm: add era target")
2026-07-08 22:33:34 +02:00
..
2026-04-03 05:11:08 -06:00
2026-02-22 08:26:33 -08:00
2026-06-16 13:20:54 +05:30
2026-04-20 19:56:44 +02:00
2023-02-14 14:23:06 -05:00
2026-02-21 17:09:51 -08:00
2024-11-20 11:38:04 +01:00
2026-02-21 17:09:51 -08:00
2023-02-14 14:23:06 -05:00
2023-02-14 14:23:06 -05:00
2026-03-26 18:31:15 +01:00
2023-02-14 14:23:07 -05:00
2026-02-21 17:09:51 -08:00
2024-11-20 11:38:04 +01:00
2023-02-14 14:23:06 -05:00
2026-03-09 14:53:39 +01:00
2026-03-02 16:50:18 +01:00
2023-02-14 14:23:06 -05:00
2026-06-16 13:20:54 +05:30
2023-02-14 14:23:06 -05:00
2023-02-14 14:23:06 -05:00
2026-04-10 15:16:06 +02:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-01-28 15:44:02 +01:00
2026-03-30 12:06:33 +02:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-07-08 22:33:34 +02:00
2026-02-21 17:09:51 -08:00
2025-12-10 19:28:22 +01:00
2026-02-21 17:09:51 -08:00
2026-05-04 14:53:52 +02:00
2026-05-04 14:53:52 +02:00
2026-03-18 15:36:33 +01:00
2026-05-25 17:56:56 +02:00
2026-03-27 22:19:17 +01:00
2023-02-14 14:23:07 -05:00
2023-02-14 14:23:06 -05:00
2026-02-21 17:09:51 -08:00
2026-05-18 14:27:11 +02:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2023-02-14 14:23:07 -05:00
2023-02-14 14:23:06 -05:00
2026-02-21 17:09:51 -08:00
2026-07-08 22:33:20 +02:00
2026-03-02 16:54:36 +01:00
2023-02-14 14:23:06 -05:00
2026-02-21 17:09:51 -08:00
2025-06-30 16:20:04 +02:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-03-02 18:43:12 +01:00
2026-05-31 19:09:17 +08:00
2026-02-21 17:09:51 -08:00
2026-05-26 11:01:55 -06:00
2023-02-14 14:23:06 -05:00
2026-02-21 20:03:00 -08:00
2026-02-21 17:09:51 -08:00
2026-02-21 20:03:00 -08:00
2026-02-22 08:26:33 -08:00
2023-03-16 13:37:06 -04:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2025-10-20 15:22:21 +02:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2023-02-14 14:23:06 -05:00
2026-02-21 17:09:51 -08:00
2023-02-14 14:23:06 -05:00
2023-02-14 14:23:06 -05:00
2026-02-21 17:09:51 -08:00
2026-03-23 17:50:52 +01:00
2026-03-09 15:12:38 +01:00
2023-06-28 10:43:04 -07:00
2026-03-27 22:19:17 +01:00
2026-01-21 14:06:23 +01:00
2026-01-21 14:06:23 +01:00
2026-03-09 15:11:41 +01:00
2026-03-27 22:19:17 +01:00
2024-05-20 15:51:19 -04:00
2026-01-14 13:12:21 +01:00
2026-06-08 14:59:14 +02:00
2026-02-21 17:09:51 -08:00
2026-02-21 17:09:51 -08:00
2024-11-20 11:38:04 +01:00
2026-05-18 14:27:11 +02:00
2025-11-05 08:07:21 -07:00
2026-05-12 12:58:13 +02:00
2026-05-12 12:58:13 +02:00
2025-01-13 07:36:29 -08:00
2026-06-21 04:19:27 +08:00
2026-06-21 04:19:27 +08:00
2026-02-22 08:26:33 -08:00
2025-03-05 00:28:39 +08:00
2026-02-21 17:09:51 -08:00
2026-06-21 04:19:27 +08:00
2026-06-21 04:19:27 +08:00
2026-05-31 19:09:18 +08:00
2026-06-01 12:52:20 -06:00
2023-06-30 15:43:50 -07:00
2026-04-28 20:44:37 +08:00
2026-06-21 04:44:42 +08:00
2026-01-26 13:17:38 +08:00
2026-04-07 13:09:22 +08:00
2022-08-02 17:14:31 -06:00
2026-02-21 20:03:00 -08:00
2026-06-25 09:56:47 -07:00
2026-06-21 03:16:24 +08:00
2026-06-21 02:14:44 +08:00
2026-01-26 13:17:38 +08:00