ext4: avoid running out of journal credits when appending to an inline file
authorTheodore Ts'o <tytso@mit.edu>
Sun, 17 Jun 2018 03:41:59 +0000 (23:41 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 20 Oct 2018 07:51:32 +0000 (09:51 +0200)
commit7dd55897f23c4e3e3a864c5c72722f7e412138e9
treedab3305b6ac583712d0a9e6845955c3591764b27
parentaee0c9e837c2d33cb072cbea01511fb77edc7ff8
ext4: avoid running out of journal credits when appending to an inline file

commit 8bc1379b82b8e809eef77a9fedbb75c6c297be19 upstream.

Use a separate journal transaction if it turns out that we need to
convert an inline file to use an data block.  Otherwise we could end
up failing due to not having journal credits.

This addresses CVE-2018-10883.

https://bugzilla.kernel.org/show_bug.cgi?id=200071

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org
[fengc@google.com: 4.4 and 4.9 backport: adjust context]
Signed-off-by: Chenbo Feng <fengc@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/ext4.h
fs/ext4/inline.c
fs/ext4/xattr.c