use of temporary directory can lead to leak-ins
Bug #1742810 reported by
Nish Aravamudan
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
git-ubuntu |
Confirmed
|
High
|
Bryce Harrington |
Bug Description
Not sure of the right terminology, but since we use the equivalent of mktemp -d without a template, if there are already, e.g., tarballs in /tmp, then they will get used inadvertently (and not be checked).
It seems like the right approach is something different than we have now, but I'm not sure what yet.
Changed in usd-importer: | |
status: | New → Confirmed |
importance: | Undecided → High |
assignee: | nobody → Nish Aravamudan (nacc) |
milestone: | none → future |
To post a comment you must log in.
If context of the execution dir is breaking us we would want/need fully context depleted environments - like containers. But that pretty fast gets pretty heavy as we already see on build.
I first thought for taballs and such alone which do ../ we could just make a two level tmp dirs.
But we have hit examples of /tmp being used directly (non relative).
I wonder if we should use mount namespace execution like [1].
I'd think of the following on entry
1. make a new empty tmp dir via mktemp
2. make that the /tmp via mount namespaces
3. actual execution
If we identify more dirs we can add them on that mechanism as well.
Should be more efficient than full system containers each time, especially for dependencies just staying as is as long as we don't touch andthing in PATH and ld path.
[1]: https:/ /blog.famzah. net/2014/ 06/04/private- tmp-mount- per-process- in-linux/