[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YumqVb5RQQ5knPk7@sol.localdomain>
Date:   Tue, 2 Aug 2022 15:51:01 -0700
From:   Eric Biggers <ebiggers@...nel.org>
To:     Evan Green <evgreen@...omium.org>
Cc:     linux-kernel@...r.kernel.org,
        Matthew Garrett <mgarrett@...ora.tech>, dlunev@...gle.com,
        zohar@...ux.ibm.com, jejb@...ux.ibm.com,
        linux-integrity@...r.kernel.org, corbet@....net, rjw@...ysocki.net,
        gwendal@...omium.org, jarkko@...nel.org, linux-pm@...r.kernel.org,
        Len Brown <len.brown@...el.com>, Pavel Machek <pavel@....cz>,
        "Rafael J. Wysocki" <rafael@...nel.org>
Subject: Re: [PATCH 09/10] PM: hibernate: Verify the digest encryption key
On Wed, May 04, 2022 at 04:21:01PM -0700, Evan Green wrote:
> +	/* TPML_PCR_SELECTION.count */
> +	if (be32_to_cpu(*(int *)payload->creation) != 1) {
> +		ret = -EINVAL;
> +		goto out;
> +	}
Make sure to run sparse by passing C=1 to make.  It will find bugs like this
where the wrong type is being used (int instead of __be32 here).
- Eric
Powered by blists - more mailing lists
 
