[aur-general] TU Application: Daniel Bermond (dbermond)
danielbermond at gmail.com
Mon Oct 15 03:22:42 UTC 2018
On 10/14/18 7:10 PM, Levente Polyak via aur-general wrote:
> Hi Daniel,
> On 10/14/18 9:49 PM, Daniel Bermond via aur-general wrote:
>> I have a project of my own called screencast, which is a command line interface to record a X11 desktop using FFmpeg, having support for offline recording, live streaming and the capability of adding some effects. It's written in pure POSIX/portable shellscript.
> Just took some seconds of reading screencast and i noticed the following
> that you may want to fix as i didn't spot in a 10sec lookup what would
> mitigate the following:
> You are using /tmp here, you should replace processing with a safe user
> owned directory aquired by `mktemp`.
> The reason:
> Its vulnerable to symlink attacks, you can delete arbitrary user owned
> files via:
> Or steal secret data like ssh or gnipg secret keys by moving it outside
> of a user-only accessable folder via a `mv` gadget:
Thank you for pointing this!
Although mktemp is not defined by the POSIX specification, it passes the
shellcheck POSIX test with /bin/sh. I think it will not defeat the POSIX
purpose of the script. Googling for it suggests that it's present
everywhere nowadays. I can check for it's presence on the system and use
it if available, otherwise fallback to the poor /tmp or something else.
I'll be implementing this as soon as I can, and also some Eli suggestions.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 488 bytes
Desc: OpenPGP digital signature
More information about the aur-general