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] [thread-next>] [day] [month] [year] [list]
Date:   Wed, 12 Jul 2023 23:59:37 -0700
From:   Eric Biggers <ebiggers@...nel.org>
To:     Ard Biesheuvel <ardb@...nel.org>
Cc:     linux-hardening@...r.kernel.org, Kees Cook <keescook@...omium.org>,
        "Guilherme G. Piccoli" <gpiccoli@...lia.com>
Subject: Re: [PATCH v3 1/2] pstore: Remove worst-case compression size logic

On Wed, Jul 12, 2023 at 06:23:31PM +0200, Ard Biesheuvel wrote:
> The worst case compression size used by pstore gives an upper bound for
> how much the data might inadvertently *grow* due to encapsulation
> overhead if the input is not compressible at all.
> 
> Given that pstore records have individual 'compressed' flags, we can
> simply store the uncompressed data if compressing it would end up using
> more space, making the worst case identical to the uncompressed case.
> 
> This means we can just drop all the elaborate logic that reasons about
> upper bounds for each individual compression algorithm, and just store
> the uncompressed data directly if compression fails for any reason.
> 
> Co-developed-by: Kees Cook <keescook@...omium.org>
> Signed-off-by: Kees Cook <keescook@...omium.org>
> Tested-by: Guilherme G. Piccoli <gpiccoli@...lia.com> # Steam Deck
> Signed-off-by: Ard Biesheuvel <ardb@...nel.org>
> ---
>  fs/pstore/platform.c | 206 ++------------------
>  1 file changed, 19 insertions(+), 187 deletions(-)

Reviewed-by: Eric Biggers <ebiggers@...gle.com>

- Eric

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ