summaryrefslogtreecommitdiff
path: root/scripts/Makefile.thinlto
diff options
context:
space:
mode:
authorShuangpeng Bai <shuangpeng.kernel@gmail.com>2026-08-16 22:15:12 -0400
committerDavid Sterba <dsterba@suse.com>2026-09-02 22:19:29 +0200
commita8813a923f9e43f788b357fb55c35f7f6ed6f98c (patch)
treeefc8bef742bff9fad80d516ce23d3cb1f02110e3 /scripts/Makefile.thinlto
parent33ce0aa4c57611c3a3485ec7c01ad67b3751447d (diff)
btrfs: fix transaction use-after-free in raid stripe insertion
If allocation of a RAID stripe extent fails, btrfs_insert_one_raid_extent() aborts and ends the transaction before returning -ENOMEM. btrfs_finish_one_ordered(), the production caller through btrfs_insert_raid_extent(), still owns the transaction handle. It handles the error by aborting the transaction and then reaches the common exit path, which ends the transaction again. The premature end can free the handle and drop its transaction reference. Transaction cleanup can then free the transaction before the caller's second abort accesses the handle and transaction, resulting in use-after-free. Keep the abort at the failure site, but let the caller's common exit path end the transaction once, after it has finished using both objects. Fixes: 02c372e1f016 ("btrfs: add support for inserting raid stripe extents") Assisted-by: Codex:GPT-5 Reviewed-by: Qu Wenruo <wqu@suse.com> Signed-off-by: Shuangpeng Bai <shuangpeng.kernel@gmail.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'scripts/Makefile.thinlto')
0 files changed, 0 insertions, 0 deletions