]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ntfs3: fix integer overflow in run_unpack() volume boundary check
authorTobias Gaertner <tob.gaertner@me.com>
Sun, 29 Mar 2026 11:17:03 +0000 (04:17 -0700)
committerKonstantin Komarov <almaz.alexandrovich@paragon-software.com>
Tue, 7 Apr 2026 16:43:39 +0000 (18:43 +0200)
commit984a415f019536ea2d24de9010744e5302a9a948
tree0ec7167c8cae562fd566af1b848ef9ac7de3f4e7
parentb62567bca47408e6739dee75f02a2113548af875
ntfs3: fix integer overflow in run_unpack() volume boundary check

The volume boundary check `lcn + len > sbi->used.bitmap.nbits` uses raw
addition which can wrap around for large lcn and len values, bypassing
the validation.  Use check_add_overflow() as is already done for the
adjacent prev_lcn + dlcn and vcn64 + len checks added by commit
3ac37e100385 ("ntfs3: Fix integer overflow in run_unpack()").

Found by fuzzing with a source-patched harness (LibAFL + QEMU).

Fixes: 82cae269cfa95 ("fs/ntfs3: Add initialization of super block")
Cc: stable@vger.kernel.org
Signed-off-by: Tobias Gaertner <tob.gaertner@me.com>
Signed-off-by: Konstantin Komarov <almaz.alexandrovich@paragon-software.com>
fs/ntfs3/run.c