RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1389545 - Code: System error: Relative paths to --tmpfs option
Summary: Code: System error: Relative paths to --tmpfs option
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: docker
Version: 7.2
Hardware: x86_64
OS: Linux
unspecified
low
Target Milestone: rc
: ---
Assignee: Antonio Murdaca
QA Contact: atomic-bugs@redhat.com
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-27 20:36 UTC by Chris Evich
Modified: 2019-03-06 00:37 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-02 00:11:21 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:2344 0 normal SHIPPED_LIVE docker bug fix and enhancement update 2017-08-08 22:51:38 UTC

Description Chris Evich 2016-10-27 20:36:06 UTC
Description of problem:
The docker client should better validate --tmpfs paths are absolute,
so that consistent and clear errors are returned when the path is relative.

Version-Release number of selected component (if applicable):
docker 1.10 (and probably 1.12)

How reproducible:
always increasing time vs path length

Steps to Reproduce:
1. # docker run -it --tmpfs . docker.io/fedora bash
2. # docker run -it --tmpfs ..///.///././ docker.io/fedora bash
3. # docker run -it --tmpfs ..///.///././/././././././..///../..//././././././././././././././././..////./././././///./././././../..///../.././../..///.///././/././././././..///../..//././././././././././././././././..////./././././///./././././../..///../.././../..///.///././/././././././..///../..//././././././././././././././././..////./././././///./././././../..///../.././../..///.///././/././././././..///../..//././././././././././././././././..////./././././///./././././../..///../.././../..///.///././/././././././..///../..//././././././././././././././././..////./././././///./././././../..///../.././../..///.///././/././././././..///../..//././././././././././././././././..////./././././///./././././../..///../.././../..///.///././/././././././..///../..//././././././././././././././././..////./././././///./././././../..///../.././../..///.///././/././././././..///../..//././././././././././././././././..////./././././///./././././../..///../.././../..///.///././/././././././..///../..//././././././././././././././././..////./././././///./././././../..///../.././../..///.///././/././././././..///../..//././././././././././././././././..////./././././///./././././../..///../.././../..///.///././/././././././..///../..//././././././././././././././././..////./././././///./././././../..///../.././../ docker.io/fedora bash

Actual results:
(something similar to)
Timestamp: 2016-10-27 19:17:30.350683572 +0000 UTC
Code: System error

Message: chmod /: operation not permitted

Frames:
---
0: setupRootfs
Package: github.com/opencontainers/runc/libcontainer
File: rootfs_linux.go@41
---
1: Init
Package: github.com/opencontainers/runc/libcontainer.(*linuxStandardInit)
File: standard_init_linux.go@59
---
2: StartInitialization
Package: github.com/opencontainers/runc/libcontainer.(*LinuxFactory)
File: factory_linux.go@247
---
3: initializer
Package: github.com/docker/docker/daemon/execdriver/native
File: init.go@35
---
4: Init
Package: github.com/docker/docker/pkg/reexec
File: reexec.go@26
---
5: main
Package: main
File: docker.go@20
---
6: main
Package: runtime
File: proc.go@188
---
7: goexit
Package: runtime
File: asm_amd64.s@1998
docker: Error response from daemon: Cannot start container 43851ec3bde299730fda2ec139ebd06f885f76a5c7c3da2a6e5e7c69a5762d0c: [9] System error: invalid character 'o' in literal true (expecting 'r').

(exit code 125)

Expected results:
A nice error mesage like, "must pass an absolute path to --tmpfs"

Additional info:
The actual backtrace seems to vary depending on the size/complexity of the relative path.  Also, the longer the path is, the longer it takes docker to process it.  The time increase does not seem linear, so given a sufficiently long relative path, it may be possible to block up the client for quite a while.  Though this is an extreme corner-case, in all instances the final error message doesn't appear to reflect the actual problem (in simple terms).

Comment 2 Antonio Murdaca 2016-10-27 21:26:29 UTC
Fedora has likely the same issue, I'll clone the bug after I investigate it.

Comment 3 Chris Evich 2016-10-28 13:25:03 UTC
Oops, forgot my m8 already had a bug on this:

https://bugzilla.redhat.com/show_bug.cgi?id=1344132

Same cause, but his is more about the error message.  I think if the relative path validation is fixed with a sensible error, both bugs can be resolved.  Though closing one for the other to keep the problem consolidated is fine too.

Comment 4 Antonio Murdaca 2017-01-14 15:48:52 UTC
Reported upstream https://github.com/docker/docker/issues/30166

Comment 5 Antonio Murdaca 2017-01-25 08:16:36 UTC
Fixed in docker-1.13 branch by https://github.com/projectatomic/docker/commit/eb54cdd87f3770d6f173052dc7ce79d2020bda12

Comment 7 Luwen Su 2017-07-22 16:14:53 UTC
In docker-1.12.6-48.git0fdc778.el7.x86_64, these errors are those below separately

Digest: sha256:b27b4c551b1d06be25a3c76c1a9ceefd7ff189f6f8b1711d3e4b230c2081bff3
/usr/bin/docker-current: Error response from daemon: invalid header field value "oci runtime error: container_linux.go:247: starting container process caused \"process_linux.go:364: container init caused \\\"rootfs_linux.go:94: reopening /dev/null inside container caused \\\\\\\"Failed to open /dev/null - open /dev/null: permission denied\\\\\\\"\\\"\"\n".


/usr/bin/docker-current: Error response from daemon: invalid header field value "oci runtime error: container_linux.go:247: starting container process caused \"process_linux.go:364: container init caused \\\"rootfs_linux.go:90: jailing process inside rootfs caused \\\\\\\"pivot_root invalid argument\\\\\\\"\\\"\"\n".


/usr/bin/docker-current: Error response from daemon: invalid header field value "oci runtime error: container_linux.go:247: starting container process caused \"process_linux.go:339: running prestart hook 3 caused \\\"error running hook: exit status 1, stdout: , stderr: \\\"\"\n".

Comment 9 errata-xmlrpc 2017-08-02 00:11:21 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:2344


Note You need to log in before you can comment on or make changes to this bug.