Page MenuHomeFeedback Tracker

Linux DS command line parsing is severely broken
Closed, ResolvedPublic


At least the -mod option has two separate problems:

  • (likely static) buffer of 1024 bytes
  • does not handle spaces correctly (this may also be a mod loader problem)

The former causes the last mod to not be considered at all (if only slightly more than 1024 bytes in the option's RHS) or a SEGV if around 1300 bytes. Using -mod multiple times with smaller arguments gets around this. Even if the latter is the intended workaround, an error message instead of SEGV would be much more useful to the user.

The second makes any mod with spaces in its subdirectory name unusable. While one can rename the toplevel dirs, this is very cumbersome if the mods come from the workshop, since they have to be renamed after every update, even when using a case-insensitive filesystem (or ciopfs).


Operating System
Linux x64
Operating System Version
Kernel 4.20.5
Dedicated Server
Steps To Reproduce

The mod names don't really matter for the buffer overflow:

$ ./arma3server -mod='aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;aaaaaaaaaa;'
17:22:12 SteamAPI initialization failed. Steam features won't be accessible!
17:22:12 Phase: fb443a00:14793
17:22:12 Phase: fb443a00:14796
17:22:12 Phase: fb443a00:14800
17:22:12 Phase: fb443a00:14803
Segmentation fault (core dumped)
Additional Information

Server version is 1.88.145285

Event Timeline

klausman created this task.Mar 2 2019, 5:28 PM
dedmen closed this task as Resolved.May 18 2020, 11:34 AM
dedmen claimed this task.