Re: [PATCH v2] signal: respect the blocked mask in dequeue_synchronous_signal()

From: Eric W. Biederman

Date: Fri Oct 23 2026 - 12:28:36 EST


Oleg Nesterov <oleg@xxxxxxxxxx> writes:

> On 10/22, Eric W. Biederman wrote:
>>
>> Oleg Nesterov <oleg@xxxxxxxxxx> writes:
>>
>> > And afaics we have another problem. sys_rt_sigqueueinfo() allows to
>> > send a SI_FROMKERNEL RT signal to itself.
>>
>> I don't see where your proposed code is addressing this.
>
> Hmm. It doesn't even try. And yes, I know it is deliberate, I know that
> CRIU uses this feature.
>
>> > In this case sigmask(q->info.si_signo) leads to UB on 32-bit.
>>
>> I presume you are referring to a signal number that exceeds 32
>> being put into a 32bit mask. That does seem worth fixing.
>
> Yes. That is all. I just tried to explain why this can happen.
> sys_rt_sigqueueinfo() is the reason. The kernel doesn't sent
> SI_FROMKERNEL signals with si_signo >= SIGRTMIN.

Oh I see. I thought you were saying it was a bug that
sys_rt_sigqueue_info could send those signals, not that
it sending those signals would cause us problems.

Eric