lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5f76fa30-53cf-4cdd-9201-5fd525573858@suse.com>
Date: Sat, 17 May 2025 20:51:34 +0200
From: Jürgen Groß <jgross@...e.com>
To: "Xin Li (Intel)" <xin@...or.com>, linux-kernel@...r.kernel.org,
 xen-devel@...ts.xenproject.org, linux-acpi@...r.kernel.org
Cc: tglx@...utronix.de, mingo@...nel.org, bp@...en8.de,
 dave.hansen@...ux.intel.com, x86@...nel.org, hpa@...or.com,
 peterz@...radead.org, boris.ostrovsky@...cle.com, dan.carpenter@...aro.org,
 rafael@...nel.org, lenb@...nel.org
Subject: Re: [PATCH v1A 2/3] x86/xen/msr: Fix uninitialized symbol 'err'

On 17.05.25 18:57, Xin Li (Intel) wrote:
> xen_read_msr_safe() currently passes an uninitialized argument err to
> xen_do_read_msr().  But as xen_do_read_msr() may not set the argument,
> xen_read_msr_safe() could return err with an unpredictable value.
> 
> To ensure correctness, initialize err to 0 (representing success)
> in xen_read_msr_safe().
> 
> Do the same in xen_read_msr(), even err is not used after being passed
> to xen_do_read_msr().
> 
> Fixes: d815da84fdd0 ("x86/msr: Change the function type of native_read_msr_safe()"
> Reported-by: Dan Carpenter <dan.carpenter@...aro.org>
> Closes: https://lore.kernel.org/xen-devel/aBxNI_Q0-MhtBSZG@stanley.mountain/
> Signed-off-by: Xin Li (Intel) <xin@...or.com>

Reviewed-by: Juergen Gross <jgross@...e.com>


Juergen

Download attachment "OpenPGP_0xB0DE9DD628BF132F.asc" of type "application/pgp-keys" (3684 bytes)

Download attachment "OpenPGP_signature.asc" of type "application/pgp-signature" (496 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ