5

I'm using bash 5.0.16 (and bash-completion 2.10) on Manjaro. Today, I absentmindedly hit the tab key while moving some files, and was greeted with an unexpected message:

[charles@wirepile some_dir]$ mv ~down*** stack smashing detected ***: <unknown> terminated

I had to ^C to regain control of the shell.

It appears that my (up-to-date Manjaro) build of bash triggers the stack protector whenever tab completion is invoked on the tilde character, with or without other characters following it. The following does work:

[charles@wirepile some_dir]$ ls ~/
.this_dir/                .that_file                 another_file

I shouldn't have any unusual lines in my .bashrc, unless Manjaro customizes it by default.

I imagine this is some sort of buffer overrun and should be considered a bug -- is it somehow intentional? Should I contact the developers, or the package maintainers?

I'm also curious -- can anyone reproduce this issue?

bignose
  • 470
  • 4
  • 12
  • 1
    Yes, it's a bug. bash shouldn't trigger the stack protector. Also mention if you have the programmable completion enabled (`shopt progcom`) and the `bash-completion` (or similar) package installed. –  Mar 08 '20 at 11:09

1 Answers1

3

is it somehow intentional? Should I contact the developers, or the package maintainers?

Yes, this is a bug. It has been reproduced by numerous others, and was reported as a bug this year (2020-01-06) to the Bash maintainers.

As of my writing this (2020-07-23), no follow-up has been posted so we don't know what the maintainers are doing about it yet.

bignose
  • 470
  • 4
  • 12