Skip to content

bug(cksum): panics when using an algorithm shake128 and shake256 with an extremly large length #12869

@HackingRepo

Description

@HackingRepo

Hi, uutils mainteners

i see chksum panics when using

relunsec@relunsec:~/software/coreutils/target/debug$ ./cksum -l=10011111117721172727 --algorithm shake128 a
memory allocation of 1251388889715146591 bytes failed
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Aborted                    (core dumped) ./cksum -l=10011111117721172727 --algorithm shake128 a
relunsec@relunsec:~/software/coreutils/target/debug$ 

or

relunsec@relunsec:~/software/coreutils/target/debug$ ./cksum -l=10011111117721172727 --algorithm shake256 a
memory allocation of 1251388889715146591 bytes failed
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Aborted                    (core dumped) ./cksum -l=10011111117721172727 --algorithm shake256 a
relunsec@relunsec:~/software/coreutils/target/debug$ 

note: that cannot be reproduced in gnu one because shake128 and shake256 only supported by the rust version

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions