From: Brendan Jackman <jackmanb@google.com>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: <stable@vger.kernel.org>, Corey Minyard <minyard@acm.org>,
Corey Minyard <cminyard@mvista.com>,
<openipmi-developer@lists.sourceforge.net>,
<linux-kernel@vger.kernel.org>,
Dan Carpenter <dan.carpenter@linaro.org>,
Corey Minyard <corey@minyard.net>
Subject: Re: [PATCH stable] ipmi:msghandler: Fix potential memory corruption in ipmi_create_user()
Date: Tue, 01 Jul 2025 11:29:59 +0000 [thread overview]
Message-ID: <DB0OMYW0QFR0.33PUE4BU0XS5D@google.com> (raw)
In-Reply-To: <2025070142-equation-unlighted-9720@gregkh>
On Tue Jul 1, 2025 at 10:14 AM UTC, Greg KH wrote:
> On Tue, Jul 01, 2025 at 09:52:55AM +0000, Brendan Jackman wrote:
>> On Mon Jun 30, 2025 at 6:10 PM UTC, Greg KH wrote:
>> > On Mon, Jun 30, 2025 at 05:09:02PM +0000, Brendan Jackman wrote:
>> >> From: Dan Carpenter <dan.carpenter@linaro.org>
>> >>
>> >> commit fa332f5dc6fc662ad7d3200048772c96b861cf6b upstream
>> >>
>> >> The "intf" list iterator is an invalid pointer if the correct
>> >> "intf->intf_num" is not found. Calling atomic_dec(&intf->nr_users) on
>> >> and invalid pointer will lead to memory corruption.
>> >>
>> >> We don't really need to call atomic_dec() if we haven't called
>> >> atomic_add_return() so update the if (intf->in_shutdown) path as well.
>> >>
>> >> Fixes: 8e76741c3d8b ("ipmi: Add a limit on the number of users that may use IPMI")
>> >> Signed-off-by: Dan Carpenter <dan.carpenter@linaro.org>
>> >> Message-ID: <aBjMZ8RYrOt6NOgi@stanley.mountain>
>> >> Signed-off-by: Corey Minyard <corey@minyard.net>
>> >> Signed-off-by: Brendan Jackman <jackmanb@google.com>
>> >> ---
>> >> I have tested this in 6.12 with Google's platform drivers added to
>> >> reproduce the bug. The bug causes the panic notifier chain to get
>> >> corrupted leading to a crash. With the fix this goes away.
>> >>
>> >> Applies to 6.6 too but I haven't tested it there.
>> >
>> > So what kernels are you wanting this to be applied to?
>>
>> Right, sorry for the ambiguity. I've just applied the patch to 6.6 and
>> booted QEMU and it worked fine.
>>
>> I have not reproduced a crash in 6.6 but it's pretty clearly a real bug
>> (it decrements the target of an uninitialized pointer).
>>
>> So if you're OK with that then please apply to 6.6 and 6.12. Otherwise
>> just 6.12 is fine, I will send another PATCH if I ever hit the issue for
>> real in 6.6.
>
> But why would we skip 6.15.y?
Ah, sorry. I forgot that existed (I was conflating "longterm" and
"stable" in my mind).
I've just applied this patch to 6.15.y and booted QEMU, seems OK.
Aaand now this made me realise I also forgot 6.1 existed and it also
has the bug. So I've just applied it to 6.1.y and booted that in QEMU
too.
So: 6.15, 6.12, 6.6, and 6.1.
prev parent reply other threads:[~2025-07-01 11:30 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-30 17:09 [PATCH stable] ipmi:msghandler: Fix potential memory corruption in ipmi_create_user() Brendan Jackman
2025-06-30 18:10 ` Greg KH
2025-07-01 9:52 ` Brendan Jackman
2025-07-01 10:14 ` Greg KH
2025-07-01 11:29 ` Brendan Jackman [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=DB0OMYW0QFR0.33PUE4BU0XS5D@google.com \
--to=jackmanb@google.com \
--cc=cminyard@mvista.com \
--cc=corey@minyard.net \
--cc=dan.carpenter@linaro.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=minyard@acm.org \
--cc=openipmi-developer@lists.sourceforge.net \
--cc=stable@vger.kernel.org \
/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