From: Qu Wenruo <wqu@suse.com>
To: linux-btrfs@vger.kernel.org
Subject: [PATCH 00/12] btrfs-progs: image: various LLM found memory
Date: Sun, 25 Oct 2026 19:11:34 +1030 [thread overview]
Message-ID: <cover.1792914402.git.wqu@suse.com> (raw)
The btrfs-image code base is pretty old (and to be honest, not written to
be read easily), and some stupid LLM-script-kiddies are reporting those
as security problems.
I don't want to argue with those guys, so just fix obvious memory related
problems for now.
There are still some left, mostly related to the corrupted tree
blocks handling, those will be addressed later, as I'm still trying to
figure out what's the best way to address them (e.g. tree-checker or
adhoc fixes).
There is also a problem in the filename image/sanitize.c, but that only
affects the filename sanitization, thus it's a very low priority item.
Qu Wenruo (12):
btrfs-progs: image: destroy chunk tree after all pthreads finished
btrfs-progs: image: only remove a chunk map from physical tree if
non-empty
btrfs-progs: image: cleanup pending ordered works after an error
btrfs-progs: image: do not cleanup the thread that failed to be
created
btrfs-progs: image: free the buffer if output allocation failed
btrfs-progs: image: avoid NULL-ptr-deref in build_chunk_tree()
btrfs-progs: image: fix the error handling of build_chunk_tree()
btrfs-progs: image: fix memory leak on async_work for restore
btrfs-progs: image: fix overwritten ret in restore_metadump()
btrfs-progs: image: validate the nritems before reading the content
btrfs-progs: image: reject incorrect super block size
btrfs-progs: image: properly error out when fseek() failed
image/image-create.c | 22 ++++++---
image/image-restore.c | 109 +++++++++++++++++++++++++++++++++---------
image/metadump.h | 7 ++-
3 files changed, 108 insertions(+), 30 deletions(-)
--
2.56.0
next reply other threads:[~2026-10-25 8:42 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-25 8:41 Qu Wenruo [this message]
2026-10-25 8:41 ` [PATCH 01/12] btrfs-progs: image: destroy chunk tree after all pthreads finished Qu Wenruo
2026-10-25 8:41 ` [PATCH 02/12] btrfs-progs: image: only remove a chunk map from physical tree if non-empty Qu Wenruo
2026-10-25 8:41 ` [PATCH 03/12] btrfs-progs: image: cleanup pending ordered works after an error Qu Wenruo
2026-10-25 8:41 ` [PATCH 04/12] btrfs-progs: image: do not cleanup the thread that failed to be created Qu Wenruo
2026-10-25 8:41 ` [PATCH 05/12] btrfs-progs: image: free the buffer if output allocation failed Qu Wenruo
2026-10-25 8:41 ` [PATCH 06/12] btrfs-progs: image: avoid NULL-ptr-deref in build_chunk_tree() Qu Wenruo
2026-10-25 8:41 ` [PATCH 07/12] btrfs-progs: image: fix the error handling of build_chunk_tree() Qu Wenruo
2026-10-25 8:41 ` [PATCH 08/12] btrfs-progs: image: fix memory leak on async_work for restore Qu Wenruo
2026-10-25 8:41 ` [PATCH 09/12] btrfs-progs: image: fix overwritten ret in restore_metadump() Qu Wenruo
2026-10-25 8:41 ` [PATCH 10/12] btrfs-progs: image: validate the nritems before reading the content Qu Wenruo
2026-10-25 8:41 ` [PATCH 11/12] btrfs-progs: image: reject incorrect super block size Qu Wenruo
2026-10-25 8:41 ` [PATCH 12/12] btrfs-progs: image: properly error out when fseek() failed Qu Wenruo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1792914402.git.wqu@suse.com \
--to=wqu@suse.com \
--cc=linux-btrfs@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox