lists.openwall.net   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  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <aFj5faLZXnKKtyxA@google.com>
Date: Mon, 23 Jun 2025 06:51:41 +0000
From: Tzung-Bi Shih <tzungbi@...nel.org>
To: Naoya Tezuka <naoyatezuka@...omium.org>
Cc: Kees Cook <kees@...nel.org>, Tony Luck <tony.luck@...el.com>,
	"Guilherme G . Piccoli" <gpiccoli@...lia.com>,
	linux-hardening@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v2] pstore/ram: Validate ECC parameters against
 Reed-Solomon constraint

On Mon, Jun 23, 2025 at 03:28:27PM +0900, Naoya Tezuka wrote:
> The Reed-Solomon library enforces the constraint `n <= 2^m - 1` via a
> BUG_ON() [1], where `n` is `block_size + ecc_size` and `m` is `symsize`
> for the pstore RAM backend. A driver providing invalid parameters can
> trigger this, leading to a kernel panic. For more details on the theory
> behind, see [2].
> 
> This issue was discovered during developing chromeos_pstore driver.
> Link: https://lore.kernel.org/lkml/20250610050458.4014083-1-naoyatezuka@chromium.org/

I'd prefer to unify it by using a [3] or at least move the tag to the end of
commit message.

> Add a check to validate this constraint before initializing Reed-Solomon
> codec. On failure, return -EINVAL to prevent the panic.
> 
> [1] https://elixir.bootlin.com/linux/v6.15/source/lib/reed_solomon/decode_rs.c#L43
> [2] https://www.cs.cmu.edu/~guyb/realworld/reedsolomon/reed_solomon_codes.html
> 
> Signed-off-by: Naoya Tezuka <naoyatezuka@...omium.org>

It should preserve my R-b tag as v2 doesn't change too much. Anyway,
Reviewed-by: Tzung-Bi Shih <tzungbi@...nel.org>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ