]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ext4: fix unaligned memory access in ext4_fc_reserve_space()
authorEric Biggers <ebiggers@google.com>
Sun, 6 Nov 2022 22:48:39 +0000 (14:48 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 7 Jan 2023 10:12:00 +0000 (11:12 +0100)
commit18e66ed75d87bcf82af94bf887174fe77261f3b8
treec749a3df679691892829650a4911111e364c3bec
parentd1c97077fa603cc52ca8746a46ab13991f5eb99c
ext4: fix unaligned memory access in ext4_fc_reserve_space()

commit 8415ce07ecf0cc25efdd5db264a7133716e503cf upstream.

As is done elsewhere in the file, build the struct ext4_fc_tl on the
stack and memcpy() it into the buffer, rather than directly writing it
to a potentially-unaligned location in the buffer.

Fixes: aa75f4d3daae ("ext4: main fast-commit commit path")
Cc: <stable@vger.kernel.org> # v5.10+
Signed-off-by: Eric Biggers <ebiggers@google.com>
Link: https://lore.kernel.org/r/20221106224841.279231-6-ebiggers@kernel.org
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/fast_commit.c