world-writable (777/666) files in /tmp/ #3416
Replies: 3 comments
-
|
Hi @catharsis71 tell us about your set up, how do you installed ASF in your system? |
Beta Was this translation helpful? Give feedback.
-
|
I'm on Ubuntu 22.04 & I just downloaded and unpacked the ASF-linux-x64.zip some time last year, launching via systemd service; automatic updates are on so it updates and restarts as needed. I've tested with the systemd |
Beta Was this translation helpful? Give feedback.
-
|
What you're explaining above is expected and normal behaviour. ASF includes support for cross-process synchronization, as explained in https://github.com/JustArchiNET/ArchiSteamFarm/wiki/Management#multiple-instances As part of that support, ASF explicitly requires world-writable files for synchronization, since only this way other ASF instances are capable of actually informing the main process that synchronization is needed, i.e. ASF can't do some rate-limited action right away. Therefore, this is not a mistake, but intended behaviour, and alternatives to it (such as using shared memory instead) are far more troublesome and risk even bigger security issues, even if not reported by your favourite auditing tool. The only solution I see here is adding new ASF setting that would opt out of cross-process synchronization, changing the underlying cross-process semaphores into local counterparts. That's possible and it'd allow the temporary directory to not be created and have no world-writable files in it, however, that'd also mean that you're losing cross-process synchronization and you intentionally run a single ASF instance across your whole machine. The more problematic part is actually single-instance mutex, those are under
I'm not sure if I want to make this configurable. On one hand, it'd be great to have a mechanism like that in ASF, since the temp files are not mandatory for operation if user knows what they're doing (not running more than 1 instance, especially for the same directory). On other hand, as a project maintainer I don't care about some "CIS auditing" tool finding those files, since they're world-writable intentionally, and world-writable temporary files fill purpose of exactly what we're doing here, so it's not a "mistake" or some other "problem" that third-party tool detects. So yes, "In almost all circumstances", this is the other circumstance. As a side note, the files created under What do you need that CIS auditing for? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
the presence of mode 777 and 666 directories and files in /tmp/ is causing my server to fail CIS auditing
auditing reported 4 directories mode 777 and 12 files mode 666
changing these to 770/660 while the program is running doesn't appear to impair the function of the program but the files are recreated whenever the program is restarted
please consider using 770/660 for these
Beta Was this translation helpful? Give feedback.
All reactions