uutils / uutils/coreutils

bug(cut): when ulimit -v 1048576 and passing to ./cut /dev/full panics

Open
#12,989 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

U - cut
Dominant language
Rust
Stars
24.1k
Forks
2k
Avg merge
1d 5h
Merged PRs (30d)
365

Description

Hi, uutils mainteners

we confirmed, when using /dev/full with ulimit, like we did in our testing

relunsec@relunsec:~/software/coreutils/target/debug$ ./cut -c 2 /dev/full
memory allocation of 1073741824 bytes failed
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Aborted                    (core dumped) ./cut -c 2 /dev/full
relunsec@relunsec:~/software/coreutils/target/debug$ 

note the -c 2 just to satisfy the command

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the failure with the ./cut entry point, -c 2, /dev/full, and the stated virtual-memory limit. Trace how cut determines input size and handles allocation for this special file; done means the command no longer panics or aborts under the reported conditions and its behavior is covered by a regression test.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.