lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  PHC 
Open Source and information security mailing list archives
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Sat, 18 Mar 2023 11:20:22 -0700
From:   Linus Torvalds <>
To:     Miguel Ojeda <>,
        "HeungJun, Kim" <>,
        Sylwester Nawrocki <>,
        Kyungmin Park <>,
        Mauro Carvalho Chehab <>
Cc:     Kees Cook <>,
        Nick Desaulniers <>,
        Jens Axboe <>,
        Nathan Chancellor <>,
        "" <>,
        clang-built-linux <>,
Subject: Re: [GIT PULL] Block fixes for 6.3-rc3

On Fri, Mar 17, 2023 at 1:51 PM Linus Torvalds
<> wrote:
> I do think that on the kernel side, the fix is to just change
>         } while (type++ != SIZE_DEFAULT_FFMT);
> to
>         } while (++type != SIZE_DEFAULT_FFMT);

Ok, I ended up deciding to just commit that minimal change, even
though it might have been better to just make it a normal for-loop
(and use M5MOLS_RESTYPE_MAX instead as the end condition).

So maybe it would be more legible (and less likely to have had that
off-by-one) if the loop had been

        for (type = 0; type < M5MOLS_RESTYPE_MAX; type++)

instead. But I'll leave that decision to the driver authors (now cc'd).

For people brought in late, this is now commit efbcbb12ee99 ("media:
m5mols: fix off-by-one loop termination error") with link to the
discussion here

so you can see the history of it (me having initially blamed UBSAN,
but the problem can be triggered at least in theory without it).


Powered by blists - more mailing lists