Re: [v2 PATCH] arith: Fix CVE-2026-31323 INTMAX_MIN / -1 overflow

Harald van Dijk <[email protected]> Tue, 14 Apr 2026 03:03:21 +0100
Newsgroups org.kernel.vger.dash
Message-ID <[email protected]>
On 14/04/2026 00:48, Herbert Xu wrote:
> Harald van Dijk <[email protected]> wrote:
>>
>> This looks fine if it's a conscious decision, but it differs from what
>> dash generally does when the result of arithmetic is not representable
>> in intmax_t, and also differs from bash. Depending on the reason there's
>> apparently a CVE for this, this may be an issue, see below.
> 
> This is not a normal overflow.  This actually raises an exception and
> kills the thread.

I mentioned how it raises SIGFPE and causes scripts to end so I am aware 
of that and wrote the rest of my message with that in mind.

Cheers,
Harald van Dijk