Re: [PATCH v2] keys: Avoid the owner account dereference in named keyring lookup

From: Jarkko Sakkinen

Date: Sat Oct 17 2026 - 12:36:17 EST


On Sat, Oct 17, 2026 at 03:47:32PM +0800, Cen Zhang wrote:
> Hi Eric,
>
> Eric Biggers <ebiggers@xxxxxxxxxx> 于2026年10月17日周六 11:51写道:
> >
> > Don't key_serial_next() and find_ge_key() (used when reading from
> > /proc/keys) have the same bug?
> >
> > - Eric
>
> Thansk a lot for the reivew. You're right — key_serial_next() and
> find_ge_key() have
> the same issue.
>
> I'll send a follow-up patch to fix those as well.
>
> Thanks for the catch again.
>
> Best regards,
> Cen Zhang

Yeah, please do.

You put so much effort to scenario and you are nailing the bug
that way, and I do appreciate that, so here's what you should do
with the commit messages:

1. Do the first half like you always do. That's great. And I've
also said that.
2. Think just a moment. If you get anxiety from that something
that should be mentioned e.g., something that you did not get
immediately yourself at first, write remarks those down. I'm
100% sure you know when it might be good tip on something
non-obvious.
3. Send that. If we feel it is lacking some info needed, let's
iterate that. It's not a big deal.

I'm just underlining this because so little would have to be
improved to make this right :-)

Br, Jarkko