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 D381A1FF146 for ; Tue, 07 Jul 2026 22:32:21 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id A3F4F21452; Tue, 07 Jul 2026 22:32:21 +0200 (CEST) From: Thomas Lamprecht To: pve-devel@lists.proxmox.com, Dominik Csapak Subject: applied: [PATCH qemu-server v2] fix #7654: prevent use after free Date: Tue, 7 Jul 2026 22:31:36 +0200 Message-ID: <178345629662.4018398.3391554842493200806.b4-ty@b4> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260602121659.2497188-1-d.csapak@proxmox.com> References: <20260602121659.2497188-1-d.csapak@proxmox.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1783456298612 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.016 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) 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: OXR7JD22C6BNSAB5EFWEFSX6Z22RU7A4 X-Message-ID-Hash: OXR7JD22C6BNSAB5EFWEFSX6Z22RU7A4 X-MailFrom: t.lamprecht@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 VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Tue, 02 Jun 2026 14:16:12 +0200, Dominik Csapak wrote: > to prevent a use after free on a client struct, instead of freeing it > inline in 'cleanup_client', only set a boolean flag 'pending_free' > and free it in the main 'handle_client' function. > > the call graphs look like this: > > handle_client > `-> cleanup_client > `-> handle_qmp_handshake > `-> cleanup_client > `-> send_qmp_cmd > `-> cleanup_client > `-> handle_qmp_event > `-> terminate_check > `-> send_qmp_cmd > `-> cleanup_client > `-> handle_qmp_return > `-> terminate_check > `-> send_qmp_cmd > `-> cleanup_client > > [...] Applied, thanks! [1/1] fix #7654: prevent use after free https://git.proxmox.com/?p=qemu-server.git;a=commitdiff;h=fe2fddabc5d25244ed3db7b1e56b21e521685122