[RAMEN9610-20751]ext4: zero out the unused memory region in the extent tree block
authorSriram Rajagopalan <sriramr@arista.com>
Fri, 10 May 2019 23:28:06 +0000 (19:28 -0400)
committerrobot <robot@samsung.com>
Sun, 27 Oct 2019 17:54:05 +0000 (02:54 +0900)
commit128f1ef06fee4d422a6304672130f2c88fd64673
tree3b0225f92214bfbc61a4d27a049f8058b9544b86
parent7293815b51a6bbab94aaac868b3e177f2080f8e7
[RAMEN9610-20751]ext4: zero out the unused memory region in the extent tree block

commit 592acbf16821288ecdc4192c47e3774a4c48bb64 upstream.

This commit zeroes out the unused memory region in the buffer_head
corresponding to the extent metablock after writing the extent header
and the corresponding extent node entries.

This is done to prevent random uninitialized data from getting into
the filesystem when the extent block is synced.

This fixes CVE-2019-11833.

Change-Id: I3dcc0bd0e41a601134041953158d73506110a88a
Signed-off-by: Sriram Rajagopalan <sriramr@arista.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Cc: stable@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/ext4/extents.c