Bug 479006 - device-mapper should check for maximal volume name length
Summary: device-mapper should check for maximal volume name length
Alias: None
Product: Fedora
Classification: Fedora
Component: device-mapper-obsolete
Version: 11
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Peter Rajnoha
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2009-01-06 13:33 UTC by Milan Broz
Modified: 2013-03-01 04:07 UTC (History)
8 users (show)

Fixed In Version: 2.02.48-1.fc11
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2009-07-19 10:32:11 UTC

Attachments (Terms of Use)

Description Milan Broz 2009-01-06 13:33:28 UTC
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 12:47:33 UTC
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 10:36:28 UTC
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:

Comment 3 Fedora Update System 2009-07-03 09:30:07 UTC
lvm2-2.02.48-1.fc11 has been submitted as an update for Fedora 11.

Comment 4 Fedora Update System 2009-07-11 17:15:53 UTC
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 10:31:28 UTC
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.