all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Wolfgang Bumiller <w.bumiller@proxmox.com>
To: Christoph Heiss <c.heiss@proxmox.com>
Cc: pve-devel@lists.proxmox.com
Subject: applied: [PATCH installer] fix #8020: common: dmi: don't error out on invalid strings
Date: Fri, 11 Sep 2026 13:28:20 +0200	[thread overview]
Message-ID: <o34knikokpm23jwwfyyn2lx2l7bkq22buesh4gjb6yws3o6xix@pztjy4ojujw7> (raw)
In-Reply-To: <20260910101543.537312-1-c.heiss@proxmox.com>

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 <c.heiss@proxmox.com>
> ---
>  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<HashMap<String, String>> {
>      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
> 
> 
> 
> 
> 

-- 




      reply	other threads:[~2026-09-11 11:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-10 10:15 [PATCH installer] fix #8020: common: dmi: don't error out on invalid strings Christoph Heiss
2026-09-11 11:28 ` Wolfgang Bumiller [this message]

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=o34knikokpm23jwwfyyn2lx2l7bkq22buesh4gjb6yws3o6xix@pztjy4ojujw7 \
    --to=w.bumiller@proxmox.com \
    --cc=c.heiss@proxmox.com \
    --cc=pve-devel@lists.proxmox.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal