Linux Btrfs filesystem development
 help / color / mirror / Atom feed
* [PATCH 00/12] btrfs-progs: image: various LLM found memory
@ 2026-10-25  8:41 Qu Wenruo
  2026-10-25  8:41 ` [PATCH 01/12] btrfs-progs: image: destroy chunk tree after all pthreads finished Qu Wenruo
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: Qu Wenruo @ 2026-10-25  8:41 UTC (permalink / raw)
  To: linux-btrfs

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


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2026-10-25  8:42 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-25  8:41 [PATCH 00/12] btrfs-progs: image: various LLM found memory Qu Wenruo
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox