From: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com>
To: cgel.zte@gmail.com
Cc: davem@davemloft.net, kuba@kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org,
"Minghao Chi (CGEL ZTE)" <chi.minghao@zte.com.cn>,
Zeal Robot <zealci@zte.com.cn>
Subject: Re: [PATCH V2] net/nfc/nci: fix infoleak in struct nci_set_config_param
Date: Wed, 2 Mar 2022 10:02:01 +0100 [thread overview]
Message-ID: <8ac6925c-e855-fe43-21cf-6701172c003b@canonical.com> (raw)
In-Reply-To: <20220302033307.2054766-1-chi.minghao@zte.com.cn>
On 02/03/2022 04:33, cgel.zte@gmail.com wrote:
> From: "Minghao Chi (CGEL ZTE)" <chi.minghao@zte.com.cn>
>
> On 64-bit systems, struct nci_set_config_param has
> an added padding of 7 bytes between struct members
> id and len. Even though all struct members are initialized,
> the 7-byte hole will contain data from the kernel stack.
> This patch zeroes out struct nci_set_config_param before
> usage, preventing infoleaks to userspace.
>
> v1->v2:
> -Modify the title.
> -Add explanatory information.
Changelog goes below ---.
> Reported-by: Zeal Robot <zealci@zte.com.cn>
Why do you ignore the comment about missing report?
> Signed-off-by: Minghao Chi (CGEL ZTE) <chi.minghao@zte.com.cn>
> ---
> net/nfc/nci/core.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/net/nfc/nci/core.c b/net/nfc/nci/core.c
> index d2537383a3e8..32be42be1152 100644
> --- a/net/nfc/nci/core.c
> +++ b/net/nfc/nci/core.c
> @@ -641,6 +641,7 @@ int nci_set_config(struct nci_dev *ndev, __u8 id, size_t len, const __u8 *val)
> if (!val || !len)
> return 0;
>
> + memset(¶m, 0x0, sizeof(param));
You ignored the comment here as well. That's not how a v2 should be
sent... if you don't agree with comments, we need to keep discussing.
> param.id = id;
> param.len = len;
> param.val = val;
Best regards,
Krzysztof
prev parent reply other threads:[~2022-03-02 9:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-02 3:33 cgel.zte
2022-03-02 4:13 ` weiyongjun (A)
2022-03-02 9:02 ` Krzysztof Kozlowski [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=8ac6925c-e855-fe43-21cf-6701172c003b@canonical.com \
--to=krzysztof.kozlowski@canonical.com \
--cc=cgel.zte@gmail.com \
--cc=chi.minghao@zte.com.cn \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=zealci@zte.com.cn \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®