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]
Date:   Tue, 31 Jan 2017 22:37:14 +0200
From:   Jarkko Sakkinen <jarkko.sakkinen@...ux.intel.com>
To:     Stefan Berger <stefanb@...ux.vnet.ibm.com>
Cc:     tpmdd-devel@...ts.sourceforge.net,
        linux-security-module@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] tpm: fix a sparse error in tpm-sysfs.c

On Tue, Jan 31, 2017 at 01:43:59PM -0500, Stefan Berger wrote:
> drivers/char/tpm/tpm-sysfs.c:161:25: warning: expression using sizeof bool
> 
> Fixes: c659af78eb7b ("tpm: Check size of response before accessing data")
> Signed-off-by: Stefan Berger <stefanb@...ux.vnet.ibm.com>
> ---
>  drivers/char/tpm/tpm.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/char/tpm/tpm.h b/drivers/char/tpm/tpm.h
> index bff37be..6b4e7aa 100644
> --- a/drivers/char/tpm/tpm.h
> +++ b/drivers/char/tpm/tpm.h
> @@ -281,7 +281,7 @@ struct permanent_flags_t {
>  typedef union {
>  	struct	permanent_flags_t perm_flags;
>  	struct	stclear_flags_t	stclear_flags;
> -	bool	owned;
> +	__u8	owned;
>  	__be32	num_pcrs;
>  	struct	tpm_version_t	tpm_version;
>  	struct	tpm_version_1_2_t tpm_version_1_2;
> -- 
> 2.4.3

A better description would be:

  The field owned has wrong sized type. This commit fixes the
  issue.

?

/Jarkko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ