Red Hat Bugzilla – Bug 141932
mount with MS_BIND flag accesses invalid data
Last modified: 2007-11-30 17:10:56 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):
Steps to Reproduce:
1.run code using umount with MS_BIND
mount("/home/drepper/tmp", "/tmp", umovestr: Input/output error
0, 0x1000, 0) = 0
mount("/home/drepper/tmp", "/tmp", 0, MS_BIND, 0) = 0
The attached patch should do the trick.
Created attachment 107935 [details]
Patch to add some more flags and support for not using printpath
There are few more MS_* flags in the current kernel which could be
I've put the fixes in, though the patch was not complete as is.
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.