]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ext4: race-condition protection for ext4_convert_unwritten_extents_endio
authorDmitry Monakhov <dmonakhov@openvz.org>
Wed, 10 Oct 2012 05:04:58 +0000 (01:04 -0400)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Thu, 29 Nov 2012 06:51:02 +0000 (22:51 -0800)
commit94ba1dd62156b053d362ece3015c2fcba0fd9159
treef54ed091d1e1036adeaf24660e1f9315fa108f3d
parent858e149371ecbac7e056320159128371bc373718
ext4: race-condition protection for ext4_convert_unwritten_extents_endio

Orabug: 14774219
This fixes: CVE-2012-4508
We assumed that at the time we call ext4_convert_unwritten_extents_endio()
extent in question is fully inside [map.m_lblk, map->m_len] because
it was already split during submission.  But this may not be true due to
a race between writeback vs fallocate.

If extent in question is larger than requested we will split it again.
Special precautions should being done if zeroout required because
[map.m_lblk, map->m_len] already contains valid data.

Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Cc: stable@vger.kernel.org
Signed-off-by: Maxim Uvarov <maxim.uvarov@oracle.com>
Conflicts:
fs/ext4/extents.c
fs/ext4/extents.c