+1
−1
Loading
Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more
When slub_debug is enabled kmalloc returns unaligned memory. XFS uses
this unaligned memory for its buffers (if an unaligned buffer crosses a
page, XFS frees it and allocates a full page instead - see the function
xfs_buf_allocate_memory).
dm-crypt checks if bv_offset is aligned on page size and these checks
fail with slub_debug and XFS.
Fix this bug by removing the bv_offset checks. Switch to checking if
bv_len is aligned instead of bv_offset (this check should be sufficient
to prevent overruns if a bio with too small bv_len is received).
Fixes: 8f0009a22517 ("dm crypt: optionally support larger encryption sector size")
Cc: stable@vger.kernel.org # v4.12+
Reported-by:
Bruno Prémont <bonbons@sysophe.eu>
Tested-by:
Bruno Prémont <bonbons@sysophe.eu>
Signed-off-by:
Mikulas Patocka <mpatocka@redhat.com>
Reviewed-by:
Milan Broz <gmazyland@gmail.com>
Signed-off-by:
Mike Snitzer <snitzer@redhat.com>
(cherry picked from commit 0440d5c0ca9744b92a07aeb6df0a9a75db6f4280)
Conflicts:
drivers/md/dm-crypt.c
Change-Id: Ib8aa866d8737b2a46fefd3ea3c07de686829b715
Bug: 112008522
Test: As series, see Ie247fd41b11adcf8520de0b1554568a1b7155860
Signed-off-by:
Eric Biggers <ebiggers@google.com>