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 846848 - mount -o loop allows mounting filesystems that are already mounted
Summary: mount -o loop allows mounting filesystems that are already mounted
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: util-linux-ng
Version: 6.2
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Karel Zak
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-08-08 21:30 UTC by Eric Parish
Modified: 2012-08-15 15:55 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-08-15 15:55:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Eric Parish 2012-08-08 21:30:32 UTC
Description of problem:
mount -o loop allows users to mount a filesystem already mounted with no warning. 

This seems dangerous. For example, when I run mount -o loop / it causes / to mount onto itself and immediate filesystem corruption.  

Version-Release number of selected component (if applicable):
Tested on RedHat 5, 6 and Fedora 17.  

How reproducible:
Always

Steps to Reproduce:
1. Mount a block device already mounted with the loop option:
mount -o loop <block device> <mount point>
  
Actual results:
A loopback device is created from the block device and mounted with no errors. 

Expected results:
The command fails with a warning that the filesystem is already mounted. 

Additional info:

Comment 2 Karel Zak 2012-08-15 15:55:35 UTC
The mount(8) command does not play such role in the system -- it's
kernel (filesystem driver) business to define what is allowed. The 
behavior is filesystem specific -- for example ext4 allows to use MMP
(multi-mount-protection, since e2fsprogs 1.42) to avoid this kind of
problems.

Seems like not a bug. Sorry.


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