Bug 719135
Summary: | GFS2: locktable and label setting issues | ||||||
---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Nate Straz <nstraz> | ||||
Component: | cluster | Assignee: | Andrew Price <anprice> | ||||
Status: | CLOSED ERRATA | QA Contact: | Cluster QE <mspqa-list> | ||||
Severity: | high | Docs Contact: | |||||
Priority: | high | ||||||
Version: | 6.2 | CC: | ccaulfie, cluster-maint, lhh, rpeterso, swhiteho, teigland | ||||
Target Milestone: | rc | ||||||
Target Release: | --- | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | cluster-3.0.12.1-7.el6 | Doc Type: | Bug Fix | ||||
Doc Text: |
Prior to this fix, boundaries for the locktable and label fields in the GFS2 superblock were not properly checked by the tunegfs2 tool. That allowed you to cause "gfs2_tool sb" to abort abnormally (buffer overflow) or to print invalid characters by using tunegfs2 to change the locktable or label to a minimum or maximum length (63 characters). Code was added to tunefs2 to check the correct boundaries of the locktable and label fields. As a result, tunegfs2 will no longer create invalid locktables or labels, and therefore, gfs2_tool will print the superblock values properly.
|
Story Points: | --- | ||||
Clone Of: | Environment: | ||||||
Last Closed: | 2011-12-06 14:52:29 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 704178 | ||||||
Attachments: |
|
Description
Nate Straz
2011-07-05 20:32:48 UTC
Created attachment 514649 [details]
Upstream patch to fix bug
The upstream patch applies cleanly to the RHEL6 branch of cluster.git so I've added my Reviewed-by line and pushed the commit. Setting to POST. Testing gfs2-utils-3.0.12.1-7.el6.x86_64.rpm with original steps to reproduce: # mkfs -t gfs2 -O -p lock_nolock -j 1 sparse-file # tunegfs2 -L A sparse-file # tunegfs2 -l sparse-file tunegfs2 (Jul 26 2011 10:11:28) Filesystem volume name: A Filesystem UUID: 8406fc34-b5dc-10da-ae8a-a939b18015bc Filesystem magic number: 0x1161970 Block size: 4096 Block shift: 12 Root inode: 22 Master inode: 23 Lock Protocol: lock_nolock Lock table: A # mkfs -t gfs2 -p lock_nolock -j 1 -t foo:longername -O sparse-file Device: sparse-file Blocksize: 4096 Device Size 10.00 GB (2621440 blocks) Filesystem Size: 10.00 GB (2621438 blocks) Journals: 1 Resource Groups: 40 Locking Protocol: "lock_nolock" Lock Table: "foo:longername" UUID: 1551398e-1876-3e8f-8687-2897e9d39e0f # tunegfs2 -o locktable=buzzezz:1234567890123456789012345678901234567890123456789012345 sparse-file # tunegfs2 -l sparse-file tunegfs2 (Jul 26 2011 10:11:28) Filesystem volume name: buzzezz:1234567890123456789012345678901234567890123456789012345 Filesystem UUID: 1551398e-1876-3e8f-8687-2897e9d39e0f Filesystem magic number: 0x1161970 Block size: 4096 Block shift: 12 Root inode: 22 Master inode: 23 Lock Protocol: lock_nolock Lock table: buzzezz:1234567890123456789012345678901234567890123456789012345 # tunegfs2 -o locktable=buzzezzz:1234567890123456789012345678901234567890123456789012345 sparse-file Lock table name too long # gfs2_tool sb sparse-file table current lock table name = "buzzezz:1234567890123456789012345678901234567890123456789012345" Looks like the behavior changed slightly. Now it looks like Filesystem volume name and Lock Table are the same field, which agrees now with the man page. Before the Lock Table was two parts, <lock table>:<volume name>. This would be set by `tunegfs2 -o locktable=<locktable>` and `tunegfs2 -L <volume name>.` I just want to verify that this change in behavior was intended. Also, since they are now the same field, do we really need -o locktable? Should lockproto be moved to a option like -p? As this is technically Steve's patch I think he can answer comment #7 more authoritatively than I can. Yes, it was intended. Not only does it now agree with the man page, but also I realised that it was going to cause all kinds of issues if we tried to separate the two. The arguments were designed to match those for tune2fs so they are just synonyms and I don't think there is any problem in leaving them "as is". We could add a -p option since tune2fs doesn't have that already, but I'm not sure that we really need to add yet another method to the tool. I don't mind doing that in the future, but its not really relevant to this bz I think. The main aim here was to ensure that the lengths of the input were being properly checked, and to fix the slightly odd behaviour of the -L flag. Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Prior to this fix, boundaries for the locktable and label fields in the GFS2 superblock were not properly checked by the tunegfs2 tool. That allowed you to cause "gfs2_tool sb" to abort abnormally (buffer overflow) or to print invalid characters by using tunegfs2 to change the locktable or label to a minimum or maximum length (63 characters). Code was added to tunefs2 to check the correct boundaries of the locktable and label fields. As a result, tunegfs2 will no longer create invalid locktables or labels, and therefore, gfs2_tool will print the superblock values properly. Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHBA-2011-1516.html |