diff options
| author | Eric Biggers <ebiggers@google.com> | 2022-02-23 12:35:04 -0800 |
|---|---|---|
| committer | Eric Biggers <ebiggers@google.com> | 2022-02-23 12:35:04 -0800 |
| commit | fa1a1fdbdea65829ce24a6b6f86ce2961e465b02 (patch) | |
| tree | 0ce729590feabe4670d2523d0f4c54f9a10f4318 /metadata/metadata.proto | |
| parent | bd380777d68816b55da85a42d4cdf7fb262b4ba2 (diff) | |
bash_completion: fix command injection and incorrect completions
Mountpoint paths might be untrusted arbitrary strings; the fscrypt bash
completion script might need to complete to such strings.
Unfortunately, the design of bash completion places some major footguns
in the way of doing this correctly and securely:
- "compgen -W" expands anything passed to it, so the argument to -W
must be single-quoted to avoid an extra level of expansion.
- The backslashes needed to escape meta-characters in the completed
text aren't added automatically; they must be explicitly added.
Note that the completion script for 'umount' used to have these same
bugs (https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=892179,
https://github.com/util-linux/util-linux/issues/539).
Fix these bugs in roughly the same way that 'umount' fixed them.
Diffstat (limited to 'metadata/metadata.proto')
0 files changed, 0 insertions, 0 deletions