Bug 479006 - device-mapper should check for maximal volume name length
device-mapper should check for maximal volume name length
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: device-mapper-obsolete (Show other bugs)
11
All Linux
low Severity medium
: ---
: ---
Assigned To: Peter Rajnoha
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-01-06 08:33 EST by Milan Broz
Modified: 2013-02-28 23:07 EST (History)
8 users (show)

See Also:
Fixed In Version: 2.02.48-1.fc11
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-07-19 06:32:11 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Milan Broz 2009-01-06 08:33:28 EST
dmsetup ignores part of provided volume name length quietly

# dmsetup create 012345678901234567890012345678900123456789001234567890012345678900123456789001234567890012345678900123456789001234567890012345678900123456andthisisignored --table "0 1 error"

# dmsetup table
0123456789012345678900123456789001234567890012345678900123456789001234567890012345678900123456789001234567890012345678900123456: 0 1 error

The same check is needed for rename (there is even bug in kernel which allows longer string, then you must address device by using major:minor)
[I sent kernel patch just few minutes ago, but userpsce need to be fixed too]

# dmsetup rename 0123456789012345678900123456789001234567890012345678900123456789001234567890012345678900123456789001234567890012345678900123456 012345678901234567890012345678900123456789001234567890012345678900123456789001234567890012345678900123456789001234567890012345678900123456andthisisignored
Unable to rename device node from '0123456789012345678900123456789001234567890012345678900123456789001234567890012345678900123456789001234567890012345678900123456' to '012345678901234567890012345678900123456789001234567890012345678900123456789001234567890012345678900123456789001234567890012345678900123456andthisisignored'

(the above command should fail in commandline paramaters validation)

# dmsetup table
device-mapper: table ioctl failed: No such device or address
Command failed

(situation above this is just demonstration of kernel bug, there is device with longer name in kernel than ioctl allows to address)

# dmsetup table -j 253 -m 0
0 1 error

- all device-mapper related commands should check for DM_NAME_LEN (it includes trailing zero.
Comment 1 Peter Rajnoha 2009-01-07 07:47:33 EST
Check for name length has been added as well as check for incorrect names containing '/' character in "dmsetup create" and "dmsetup rename" (the device does not exist in filesystem yet, so entering the path is not allowed).

The fix has been uploaded to upstream CVS (DM version 1.02.30).
Comment 2 Bug Zapper 2009-06-09 06:36:28 EDT
This bug appears to have been reported against 'rawhide' during the Fedora 11 development cycle.
Changing version to '11'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 3 Fedora Update System 2009-07-03 05:30:07 EDT
lvm2-2.02.48-1.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/lvm2-2.02.48-1.fc11
Comment 4 Fedora Update System 2009-07-11 13:15:53 EDT
lvm2-2.02.48-1.fc11 has been pushed to the Fedora 11 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update lvm2'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-7468
Comment 5 Fedora Update System 2009-07-19 06:31:28 EDT
lvm2-2.02.48-1.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.

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