TransWikia.com

Why does bash's tab completion trigger the stack protector?

Unix & Linux Asked by Charles Diploma on December 6, 2021

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?

One Answer

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.

Answered by bignose on December 6, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP