[GH-ISSUE #3383] Error: too long environment variables in vifm's subshell #2125

Closed
opened 2026-05-05 08:48:23 -06:00 by gitea-mirror · 3 comments
Owner

Originally created by @jose1711 on GitHub (Apr 25, 2020).
Original GitHub issue: https://github.com/netblue30/firejail/issues/3383

Describe the bug
I am getting Error: too long environment variables error in console for commands run inside vifm's subshell. Here's one example:

wget https://some_url
Error: too long environment variables

Behavior change on disabling firejail
when wget is run w/ absolute path (hence without firejail) it runs normally.

To Reproduce

  1. run vifm
  2. Esc :shell
  3. wget
  4. observe the error

Expected behavior
It would be great if jailed programs work inside vifm session.

Desktop:

  • Arch Linux, 64bit, current
firejail version 0.9.63

Compile time support:
   - AppArmor support is enabled
   - AppImage support is enabled
   - chroot support is enabled
   - file and directory whitelisting support is enabled
   - file transfer support is enabled
   - firetunnel support is enabled
   - networking support is enabled
   - overlayfs support is enabled
   - private-home support is enabled
   - seccomp-bpf support is enabled
   - user namespace support is enabled
   - X11 sandboxing support is enabled

 firejail-git r6104.17b717ed-1
Originally created by @jose1711 on GitHub (Apr 25, 2020). Original GitHub issue: https://github.com/netblue30/firejail/issues/3383 **Describe the bug** I am getting `Error: too long environment variables` error in console for commands run inside `vifm`'s subshell. Here's one example: ``` wget https://some_url Error: too long environment variables ``` **Behavior change on disabling firejail** when `wget` is run w/ absolute path (hence without `firejail`) it runs normally. **To Reproduce** 1. run `vifm` 2. <kbd>Esc</kbd> `:shell` 3. `wget` 4. observe the error **Expected behavior** It would be great if jailed programs work inside `vifm` session. **Desktop:** - Arch Linux, 64bit, current ``` firejail version 0.9.63 Compile time support: - AppArmor support is enabled - AppImage support is enabled - chroot support is enabled - file and directory whitelisting support is enabled - file transfer support is enabled - firetunnel support is enabled - networking support is enabled - overlayfs support is enabled - private-home support is enabled - seccomp-bpf support is enabled - user namespace support is enabled - X11 sandboxing support is enabled firejail-git r6104.17b717ed-1 ```
Author
Owner

@rusty-snake commented on GitHub (Apr 25, 2020):

FYI: #3325

<!-- gh-comment-id:619428972 --> @rusty-snake commented on GitHub (Apr 25, 2020): FYI: #3325
Author
Owner

@matu3ba commented on GitHub (Apr 25, 2020):

FYI: #3325

Either making size of environment variables bigger on risk of stack smashing (I am unsure what is the minimum size for that though),
or clean up your env.

<!-- gh-comment-id:619453090 --> @matu3ba commented on GitHub (Apr 25, 2020): > FYI: #3325 Either making size of environment variables bigger on risk of stack smashing (I am unsure what is the minimum size for that though), or clean up your `env`.
Author
Owner

@jose1711 commented on GitHub (May 14, 2020):

Thanks for pointing this out.
inside vifm

$ env | awk -F= '(length-length($1)) > 4096 {print $1" variable has "(length-length($1))" chars!"}' 
PROMPT variable has 5953 chars!

in "normal" shell session:

PROMPT is not exported

On my system it's caused by a specific combination of oh-my-zsh and vifm customization so I changed it in the configuration. Thank you, closing.

<!-- gh-comment-id:628821502 --> @jose1711 commented on GitHub (May 14, 2020): Thanks for pointing this out. inside `vifm` ``` $ env | awk -F= '(length-length($1)) > 4096 {print $1" variable has "(length-length($1))" chars!"}' PROMPT variable has 5953 chars! ``` in "normal" shell session: ``` PROMPT is not exported ``` On my system it's caused by a specific combination of oh-my-zsh and `vifm` customization so I changed it in the configuration. Thank you, closing.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: github-starred/firejail#2125
No description provided.