From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [IPv6:2a0f:8001:1:32::40]) by lore.proxmox.com (Postfix) with ESMTPS id ABB5B1FF0E5 for ; Wed, 12 Aug 2026 10:26:13 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 58636214AC; Wed, 12 Aug 2026 10:26:13 +0200 (CEST) From: Robert Obkircher To: pbs-devel@lists.proxmox.com Subject: [PATCH v2 proxmox 0/6] uninitialized memory allocations fixes Date: Wed, 12 Aug 2026 10:23:29 +0200 Message-ID: <20260812082549.21561-1-r.obkircher@proxmox.com> X-Mailer: git-send-email 2.47.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1786523152811 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.782 Adjusted score from AWL reputation of From: address DMARC_MISSING 0.1 Missing DMARC policy KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment (newer systems) RCVD_IN_DNSWL_MED -2.3 Sender listed at https://www.dnswl.org/, medium trust SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record Message-ID-Hash: ZHZNYAWDUVEALZXWLIDJJEOAFACXZ253 X-Message-ID-Hash: ZHZNYAWDUVEALZXWLIDJJEOAFACXZ253 X-MailFrom: r.obkircher@proxmox.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox Backup Server development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: Fix multiple issues around uninitialized allocations and remove unused buggy code. All changes are in the proxmox repo. I chose the pbs mailing list because proxmox-io is mainly used there. Changes since [v1]: * marked example in doc comment as no_run [v1] https://lore.proxmox.com/pbs-devel/20260811150237.527116-1-r.obkircher@proxmox.com/ Robert Obkircher (6): uuid: avoid potential null dereference and memory leaks io: request zeroed memory instead of manually clearing it io: avoid potential null dereference and memory leak on error path io: remove boxed::uninitialized because it is unsound io: remove unused append_to_vec functions io: remove unused ByteVecExt trait with grow_ and resize_uninitialized proxmox-io/src/boxed.rs | 19 +----- proxmox-io/src/read.rs | 44 ++----------- proxmox-io/src/vec/byte_vec.rs | 115 --------------------------------- proxmox-io/src/vec/mod.rs | 37 ++++++----- proxmox-uuid/src/lib.rs | 14 ++-- 5 files changed, 34 insertions(+), 195 deletions(-) delete mode 100644 proxmox-io/src/vec/byte_vec.rs -- 2.47.3