The same thing happens when using steam -applaunch ....
e.g.: steam -applaunch 221100 '-mod=@1797720064-WindstridesClothingPack;@2529499382-Greenhell;@2621103156-Gas_Masks_Only;@1564026768-Community_Online_Tools;@1559212036-CF;@2716445223-Melkart_Beta' -connect=135.148.136.226:2602 -nolauncher -name=Dick
When that is run from a terminal, that command successfully launches DayZ with the mods and connects to the server.
But this command, which is > 931 characters:
steam -applaunch 221100 '-mod=@2735895032-Aerial_Flares;@2658965218-FHTC_T4;@2326108316-Cabin_Mod_CodeLock_RaGed;@2326103329-Cabin_Mod_RaGed;@1734713776-MunghardsItempack;@2384407442-ZStuff;@2608895186-Keep_it_dead_ProjectBR;@2575183443-Collectable_Items;@2224213321-Perishable_Food_Fixed;@1850623448-Zeroy_FishingZ;@1932611410-CannabisPlus;@1819514788-Ear_Plugs;@1791033033-Dayz_Navigation;@2444247391-Inventory_Move_Sounds;@1648967877-GoreZ;@2501812949-Flying_Birds;@2078722927-AmbientLight;@2049002856-MuchCarKey;@2518235197-DMS_Vehicle_Weather_Performance_Increase;@2311951200-dbo_surfaces_nam;@1832448183-FlipTransport;@1912237302-IRP_Land_Rover_Defender_110;@2428693622-PsychoGaming_Big_Boys_Pack;@1873064588-HellRetex_Survival;@2143128974-Advanced_Weapon_Scopes;@1793351435-Remastered_Arma_Weapon_Pack;@2273590683-RevGuns;@2155726353-Mortys_Weapons;@1646187754-Code_Lock;@2546583347-BuildEverywhere;@2398911445-Basic_Territories;@2413002744-Advanced_Banking;@2149462115-ZT_Vending_Machine;@2484279619-Quadlock_s_Pack;@2489196158-Spurgles_BagZ;@1566911166-Mass_sManyItemOverhaul;@1962144102-Modular_Vest_System;@1967655509-MuchDecos;@2345073965-CJ187_LootChest;@1991570984-MuchStuffPack;@1797720064-WindstridesClothingPack;@1680019590-Server_Information_Panel;@1590841260-Trader;@2353998362-Notifications;@2662802517-FHTC_T1;@2572633941-FHTC_VMP;@2603158109-FHTC_T2;@2602656458-FHTC_HR;@2483384706-FHTC_MP;@2488768779-FHTC_FLS;@2479057860-FHTC;@2428595209-FS;@2614334381-sFramework;@2469448088-sVisual;@1828439124-VPPAdminTools;@1565871491-BuilderItems;@2276010135-DayZ_Editor_Loader;@2545327648-Dabs_Framework;@2289461232-Namalsk_Survival;@2289456201-Namalsk_Island;@1559212036-CF' -connect=135.148.136.199:2402 -nolauncher
When run from the terminal, there is no reaction from the running Steam client, and subsequent calls to the first command (or any other steam:// URL or steam -whatever command) no longer, as previously described. Only restarting the Steam client restores this capability of invoking the launching of Steams games from outside of steam (as long as they're not > 931 characters)
As I've been reading about how to launch Steam games from outside of Steam in a portable manner, I've read that the "correct" and most portable way is to use steam:// URLs, or make calls to steam -applaunch, as any other way relies on shelling out to the game from within the OS. With Proton on Linux, there is no easy way to do this. Unless this length limit is increased, people like me will not be able to write launchers for games whose launch commands exceed this built in limit.
But really, the fact that this stops working once it's trigger, IMO, indicates some buffer is being overrun, and that's never good. Maybe I'll start seeing what executable payload I can start adding after the 931st character...
I don't have windows, but I suspect this is an issue there as well.
Thanks gain for supporting Linux!
For what it's worth the same issue occurs if you write something longer than 1023 characters into ~/.steam/steam.pipe.
Running head -c1024 /dev/urandom | base64 -w0 | head -c1022 | sed 's/$/\n/' > ~/.steam/steam.pipe (1023 chars including newline) Steam prints ExecCommandLine:..., and continues responding to input through the pipe.
Running head -c1024 /dev/urandom | base64 -w0 | head -c1023 | sed 's/$/\n/' > ~/.steam/steam.pipe (1024 chars) yields no output from Steam and causes the pipe to stop responding, even to proper input such as steam://store.
When testing this I also noticed that the pipe expects a newline before it takes any action and will concatenate the input of separate writes until it finds a newline. Unfortunately splitting input into smaller chunks still caused the same problem. Example: head -c1024 /dev/urandom | base64 -w0 | head -c512 > ~/.steam/steam.pipe && head -c1024 /dev/urandom | base64 -w0 | head -c512 > ~/.steam/steam.pipe && echo > ~/.steam/steam.pipe still triggers the same behavior
What's worse, if this really is a buffer overflow, is that clicking links on the web will also trigger this behavior if they contain a steam:// URL that's too long. POC: https://s.echoz.io/steam_url_bug.html
I had a friend on Windows test my POC and this behavior does not appear to be present there. The store link and desktop shortcuts (which as far as i know also use steam:// URLs) remained functional after clicking the long link.
Hello @DanielCeregatti, thanks for finding the older issue report. Since this issue report adds a bit more insight, I've gone ahead and transferred this issue report to https://github.com/ValveSoftware/steam-for-linux/issues/5753#issuecomment-1172980418.
Closing in favor of the older issue report.
Your system information
Please describe your issue in as much detail as possible:
Invoke a
steam://URL of size > 931 characters. The Steam client does not react to this at all, and any subsequent invocation of asteam://URL, even when of a smaller size, results in no reaction from the Steam clientNormally, when the Steam client is open from the terminal, its stdout/stderr will appear there. Subsequently, when a
steam://URL is invoked, it will react to these invocations, responding with both output in the terminal as well as executing the expected result, such as launching a game.Steps for reproducing this issue:
steamfrom the command line. Wait for the Steam client to start. This is just to see the extra output.steam steam://run/appidObserve as the terminal from which Steam was launched will begin to show output, and the Steam client launches the game specified by appid.
Run steam from the terminal again, but this time with a very long URL: (The appid here is DayZ, with a legit URL designed to launch the game correctly with all the mods necessary to join the server, whose IP and port are also specified)
steam "steam://run/221100//-connect=135.148.136.199 -port=2402 -name=Dick -nopause -nolauncher -mods=@CF;@NamalskIsland;@NamalskSurvival;@DabsFramework;@DayZEditorLoader;@BuilderItems;@VPPAdminTools;@sVisual;@sFramework;@FS;@FHTC;@FHTC_FLS;@FHTC_MP;@FHTC_HR;@FHTC_T2;@FHTC_VMP;@FHTC_T1;@Notifications;@Trader;@Server_Information_Panel;@WindstridesClothingPack;@MuchStuffPack;@CJ187LootChest;@MuchDecos;@ModularVestSystem;@MasssManyItemOverhaul;@Spurgles_BagZ;@QuadlocksPack;@ZTVendingMachine;@AdvancedBankingExperimental;@BasicTerritories;@BuildEverywhere;@CodeLock;@MortysWeapons;@RevGuns;@RemasteredArmaWeaponPack;@AdvancedWeaponScopes;@HellRetexSurvival;@PsychoGamingBigBoysPack;@IRPLandRoverDefender110;@FlipTransport;@dbo_surfaces_nam;@DMSVehicleWeatherPerformanceIncrease;@MuchCarKey;@AmbientLight;@FlyingBirds;@GoreZ;@InventoryMoveSounds;@DayzNavigation;@EarPlugs;@CannabisPlus;@ZeroyFishingZ;@PerishableFoodFixed;@CollectableItems;@KeepitdeadProjectBR;@ZStuff;@MunghardsItempack;@Cabin_Mod_RaGed;@Cabin_Mod_CodeLock_RaGed;@FHTC_T4;@AerialFlares;"steam://URLs, regardless of size, cause no further reactions from the Steam client.The above URL is one that has been crafted by a DayZ launcher I'm working on to support connecting from the DayZ client running on Linux with Proton in Steam. It works for launching DayZ using URLs that fall below the 931 character limit.
But I find it concerning that
steam://URLs stop working after the first time a large request is made, indicating that something internal has gone south. Buffer overflow, perhaps? We all know what those lead to...Thanks for supporting Linux!