From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from gate001.proxmox.com (gate001.proxmox.com [45.144.208.40]) by lore.proxmox.com (Postfix) with ESMTPS id A97DE1FF0B3 for ; Fri, 11 Sep 2026 13:28:38 +0200 (CEST) Received: from gate001.proxmox.com (localhost.localdomain [127.0.0.1]) by gate001.proxmox.com (Proxmox) with ESMTP id 9E61A21482; Fri, 11 Sep 2026 13:28:25 +0200 (CEST) Date: Fri, 11 Sep 2026 13:28:20 +0200 From: Wolfgang Bumiller To: Christoph Heiss Subject: applied: [PATCH installer] fix #8020: common: dmi: don't error out on invalid strings Message-ID: References: <20260910101543.537312-1-c.heiss@proxmox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20260910101543.537312-1-c.heiss@proxmox.com> X-Bm-Milter-Handled: 55990f41-d878-4baa-be0a-ee34c49e34d2 X-Bm-Transport-Timestamp: 1789126090011 X-SPAM-LEVEL: Spam detection results: 0 AWL 0.831 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: 6C5U3IZLXEMW4KVCEKHOUQ3E6ZYBZP3F X-Message-ID-Hash: 6C5U3IZLXEMW4KVCEKHOUQ3E6ZYBZP3F X-MailFrom: w.bumiller@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 CC: pve-devel@lists.proxmox.com X-Mailman-Version: 3.3.10 Precedence: list List-Id: Proxmox VE development discussion List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: applied, thanks FYI: I also updated the proxmox-installer-types dependency On Thu, Sep 10, 2026 at 12:15:34PM +0200, Christoph Heiss wrote: > .. when reading attributes. > > Fixes #8020 [0]. > > Although the SMBIOS specification states that text strings must be > encoded as UTF-8 (w/o BOM) [1], bogus/broken firmwares may put junk > bytes in there. > > On consumer hardware, there is normally also no way to change/fix these > entries. > > So just skip these invalid attributes, which don't contain valid UTF-8. > > [0] https://bugzilla.proxmox.com/show_bug.cgi?id=8020 > [1] DSP0134 SMBIOS spec v3.9.0; section 6.1.3 "Text strings" > > Signed-off-by: Christoph Heiss > --- > proxmox-installer-common/src/dmi.rs | 8 +++++--- > 1 file changed, 5 insertions(+), 3 deletions(-) > > diff --git a/proxmox-installer-common/src/dmi.rs b/proxmox-installer-common/src/dmi.rs > index 76ae4a5..a1127e3 100644 > --- a/proxmox-installer-common/src/dmi.rs > +++ b/proxmox-installer-common/src/dmi.rs > @@ -1,4 +1,4 @@ > -use std::{collections::HashMap, fs}; > +use std::{collections::HashMap, fs, io::ErrorKind}; > > use anyhow::{Result, bail}; > use proxmox_installer_types::SystemDMI; > @@ -28,8 +28,10 @@ fn get_dmi_infos_for(files: &[&str]) -> Result> { > for file in files { > let path = format!("{DMI_PATH}/{file}"); > let content = match fs::read_to_string(&path) { > - Err(ref err) if err.kind() == std::io::ErrorKind::NotFound => continue, > - Err(ref err) if err.kind() == std::io::ErrorKind::PermissionDenied => { > + Err(ref err) if [ErrorKind::NotFound, ErrorKind::InvalidData].contains(&err.kind()) => { > + continue; > + } > + Err(ref err) if err.kind() == ErrorKind::PermissionDenied => { > bail!("Could not read data. Are you running as root or with sudo?") > } > Err(err) => bail!("Error: '{err}' on '{path}'"), > -- > 2.55.0 > > > > > --