#1003304 debsigs uses a predictable /tmp directory name

Package:
debsigs
Source:
debsigs
Submitter:
"Todd C. Miller"
Date:
2022-01-07 21:21:04 UTC
Severity:
normal
Tags:
#1003304#5
Date:
2022-01-07 21:17:39 UTC
From:
To:
Dear Maintainer,

When debsigs creates its temporary directory, it just uses
"/tmp/debsigndeb.$$" where "$$" is the process ID.  Using a predictable
temporary file name can be a security issue if an attacker is able to
create the path first.  However, Since debsig uses a temporary directory,
not a file, only a denial of service attack is possible.

It would be safer to use the built-in mkdtemp() function when creating
the temporary directory, which creates a random name and will retry
as needed if the chose name already exists.

The attached fix is also in gitlab as:
https://gitlab.com/debsigs/debsigs/-/merge_requests/2

 - todd

*** Reporter, please consider answering these questions, where appropriate ***

   * What led up to the situation?
   * What exactly did you do (or not do) that was effective (or
     ineffective)?
   * What was the outcome of this action?
   * What outcome did you expect instead?

*** End of the template - remove these template lines ***