ext4: fix possible use after free with metadata csum
Commit fa77dcfa introduces block bitmap checksum calculation into ext4_new_inode() in the case that block group was uninitialized. However we brelse() the bitmap buffer before we attempt to checksum it so we have no guarantee that the buffer is still there. Fix this by releasing the buffer after the possible checksum computation. Signed-off-by: NLukas Czerner <lczerner@redhat.com> Signed-off-by: N"Theodore Ts'o" <tytso@mit.edu> Acked-by: NDarrick J. Wong <darrick.wong@oracle.com> Cc: stable@vger.kernel.org
Showing
想要评论请 注册 或 登录