Bug 141932 - mount with MS_BIND flag accesses invalid data
mount with MS_BIND flag accesses invalid data
Product: Fedora
Classification: Fedora
Component: strace (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Roland McGrath
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2004-12-06 03:12 EST by Ulrich Drepper
Modified: 2007-11-30 17:10 EST (History)
1 user (show)

See Also:
Fixed In Version: RHBA-2005-130
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2005-02-01 23:36:37 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Patch to add some more flags and support for not using printpath (1.19 KB, patch)
2004-12-06 03:12 EST, Ulrich Drepper
no flags Details | Diff

  None (edit)
Description Ulrich Drepper 2004-12-06 03:12:46 EST
Description of problem:
If the MS_BIND or MS_MOVE or MS_REMOUNT flag is used with mount, the filesystem
parameter is ignored.  The user might pass garbage (or NULL).  The printpath
call currently used to print the value then fails in umovestr.  This should be

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.run code using umount with MS_BIND
Actual results:
mount("/home/drepper/tmp", "/tmp", umovestr: Input/output error
0, 0x1000, 0) = 0

Expected results:
mount("/home/drepper/tmp", "/tmp", 0, MS_BIND, 0) = 0

Additional info:
The attached patch should do the trick.
Comment 1 Ulrich Drepper 2004-12-06 03:12:46 EST
Created attachment 107935 [details]
Patch to add some more flags and support for not using printpath
Comment 2 Dmitry V. Levin 2004-12-19 20:47:25 EST
There are few more MS_* flags in the current kernel which could be
added altogether.
Comment 3 Roland McGrath 2005-02-01 23:36:37 EST
I've put the fixes in, though the patch was not complete as is.
Comment 4 Tim Powers 2005-05-19 17:10:02 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.


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