mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "zhangjianhua (E)" <chris.zjh@huawei.com>
To: Greg KH <gregkh@linuxfoundation.org>, <nathanl@linux.ibm.com>,
	<mpe@ellerman.id.au>
Cc: <cve@kernel.org>, <linux-cve-announce@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>,
	"youbowen (A)" <youbowen2@huawei.com>
Subject: Re: CVE-2022-49623: powerpc/xive/spapr: correct bitmap allocation size
Date: Fri, 7 Mar 2025 11:16:29 +0800	[thread overview]
Message-ID: <0bea64d3-34bd-4c4f-8386-ce29acaf5f6c@huawei.com> (raw)
In-Reply-To: <2025030618-opal-chomp-5731@gregkh>

Yes, there is still some confusion about this bugfix patch. Hope Nathan 
and Michael can explain and give more details.

在 2025/3/6 21:58, Greg KH 写道:
> On Thu, Mar 06, 2025 at 09:41:41PM +0800, zhangjianhua (E) wrote:
>> Hi Greg,
>>
>> The commit message of this patch show that it occurs out-of-bounds of
>> xibm->bitmap,the reason is that the allocated object can be smaller than
>> sizeof(long) while bits is small.
>>
>> However, it is incorrect.  The kzalloc interface allocates memory in the
>> unit of byte while bitmap_zalloc does based on the number of bits after
>> rounded up, the space allocated by the kzalloc is not less than that
>> allocated by the bitmap_zalloc. Therefore, replacing the kzalloc with the
>> bitmap_zalloc does not solve the problem. In fact, the problem of
>> out-of-bounds access does not exist. For instance the xibm->count is
>> 3,kzalloc and bitmap_zalloc both return 8 bytes,it's enough for all
>> bitmap. Although using the kzalloc wastes some memory, it does not create
>> any real problems.
>>
>> Maybe this CVE should be rejected?
> We will be glad to reject this if you think this does not actually fix
> anything at all.  If so, just let us know.
>
> thanks,
>
> greg k-h
>
>

      reply	other threads:[~2025-03-07  3:16 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-06 13:41 zhangjianhua (E)
2025-03-06 13:58 ` Greg KH
2025-03-07  3:16   ` zhangjianhua (E) [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=0bea64d3-34bd-4c4f-8386-ce29acaf5f6c@huawei.com \
    --to=chris.zjh@huawei.com \
    --cc=cve@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-cve-announce@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpe@ellerman.id.au \
    --cc=nathanl@linux.ibm.com \
    --cc=youbowen2@huawei.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 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®