[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#769195: marked as done (unblock: dosfstools/3.0.27-1)



Your message dated Thu, 20 Nov 2014 19:18:07 +0000
with message-id <20141120191807.GX6216@lupin.home.powdarrmonkey.net>
and subject line Re: Bug#769195: unblock: dosfstools/3.0.27-1
has caused the Debian Bug report #769195,
regarding unblock: dosfstools/3.0.27-1
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
769195: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=769195
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock

Please unblock package dosfstools

I have adopted the dosfstools package while it had two major bugs. Since
I also adopted upstream, I have put the fixes into a new upstream
release which I then packaged. There are no code changes in this
upstream release except these fixes.

There is #768909, in which fatlabel potentially reports garbage for a
filesystem label and damages the root directory when changing the label.
fsck can fix this at the loss of the affected long file name, leaving
only the short DOS file name. I have no data if and how much worse the
damage can get if it isn't immediately fsck'd.

Another is #764992, which should probably have gotten a higher priority
than normal. fsck.fat would randomly (cause is an unitialized field in a
stack variable) report a spurious damaged (empty) file name error and
attempt to fix it, luckily entirely ineffectually. Still there is
disruption in the form of repeated false alarms.

(Okay, I also sneaked in a tiny fix removing one printf().)

Total code change is minimal at 7 added/removed lines. The rest is
changelog and version number changes as well as setting myself as
maintainer and pointing to new upstream location. I stripped the version
number changes in man pages from the following diff to make it smaller.



diff -Nru dosfstools-3.0.26/ChangeLog dosfstools-3.0.27/ChangeLog
--- dosfstools-3.0.26/ChangeLog	2014-03-07 18:39:46.000000000 +0100
+++ dosfstools-3.0.27/ChangeLog	2014-11-12 01:10:37.000000000 +0100
@@ -1,4 +1,77 @@
-commit 6893c45 (HEAD, origin/master, origin/HEAD, master)
+commit e2c8f06 (HEAD, origin/master, master)
+Author: Andreas Bombe <aeb@debian.org>
+Date:   Wed Nov 12 00:22:17 2014 +0100
+
+    fsck.fat: Don't print version string every time -v is encountered
+    
+    Remove the printing of the version string every time -v is seen during
+    command line parsing in fsck.fat. The version string is printed anyway
+    before opening the filesystem device/image.
+    
+    Signed-off-by: Andreas Bombe <aeb@debian.org>
+
+commit 82076b6
+Author: Andreas Bombe <aeb@debian.org>
+Date:   Tue Nov 11 23:25:30 2014 +0100
+
+    Fix attempt to rename root dir in fsck due to uninitialized fields
+    
+    When add_file() is called with offset 0, it will construct a DIR_ENT for
+    the root directory instead of reading the contents from the filesystem.
+    It did not initialize the whole DIR_ENT on the stack, just select
+    values.
+    
+    In particular, the lcase field was left with an undefined value. If
+    that value happened to include the FAT_NO_83NAME bit, the "neither long
+    nor short file name" check in bad_name() added in 3.0.26 would trigger
+    and cause an attempt to rename the entry (which is not possible).
+    Example run:
+    
+        $ /sbin/fsck.fat -y bad.img
+        fsck.fat 3.0.26 (2014-03-07)
+        /
+          Bad short file name ().
+          Auto-renaming it.
+          Renamed to
+        bad.img: 14 files, 19388/403266 clusters
+    
+    This commit changes the initialization zeroize the whole struct before
+    setting individual fields. Thanks to AlexisM, who found the cause and
+    posted a patch on the Debian bug http://bugs.debian.org/764992 .
+    
+    Signed-off-by: Andreas Bombe <aeb@debian.org>
+
+commit c24ecb6
+Author: Andreas Bombe <aeb@debian.org>
+Date:   Tue Nov 11 22:49:50 2014 +0100
+
+    Support long file names in volume labeling code
+    
+    The code to find the volume label directory entry in find_volume_de()
+    did not consider long file names so far. Directory entries that make up
+    long file names have four attribute bits set, including the "volume"
+    bit.
+    
+    This caused the code to mistake a directory entry that is part of a
+    long file name as the volume name entry. If such an entry is found
+    first, fatlabel would print garbage when asked to display the label and
+    mangle the long file name when asked to set it. The latter would lead
+    to the loss of the long file name and require a fsck to clean up.
+    
+    Change so that the set of attributes equal that of LFN entries will no
+    langer match as a volume label.
+    
+    Signed-off-by: Andreas Bombe <aeb@debian.org>
+
+commit 1646f6e (tag: v3.0.26)
+Author: Daniel Baumann <mail@daniel-baumann.ch>
+Date:   Fri Mar 7 18:40:13 2014 +0100
+
+    Releasing version 3.0.26.
+    
+    Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
+
+commit 6893c45
 Author: Dir Lotter <dirk.lotter@siemens.com>
 Date:   Fri Mar 7 18:25:39 2014 +0100
 
diff -Nru dosfstools-3.0.26/debian/changelog dosfstools-3.0.27/debian/changelog
--- dosfstools-3.0.26/debian/changelog	2014-10-12 08:14:13.000000000 +0200
+++ dosfstools-3.0.27/debian/changelog	2014-11-12 03:34:37.000000000 +0100
@@ -1,3 +1,27 @@
+dosfstools (3.0.27-1) unstable; urgency=medium
+
+  * New upstream version 3.0.27
+    - fixes fatlabel mangling long file names in root directory
+      (Closes: #768909)
+    - fixes spurious uncorrectable empty file name error reported by
+      fsck.fat (thanks to AlexisM for finding the cause)
+      (Closes: #764992)
+  * New maintainer
+  * New upstream, change debian/watch and fields in debian/control and
+    debian/copyright accordingly
+  * Remove 0001-LFN-is-no-volume-entry.patch, already fixed in upstream
+
+ -- Andreas Bombe <aeb@debian.org>  Wed, 12 Nov 2014 03:21:26 +0100
+
+dosfstools (3.0.26-5) unstable; urgency=medium
+
+  * QA upload
+  * set Vcs-* to collab-maint
+  * add 0001-LFN-is-no-volume-entry.patch:
+    don't overwrite LFN entries with volume entries (Closes: #768909)
+
+ -- Bernhard R. Link <brlink@debian.org>  Tue, 11 Nov 2014 20:38:15 +0100
+
 dosfstools (3.0.26-4) unstable; urgency=medium
 
   * QA upload.
diff -Nru dosfstools-3.0.26/debian/control dosfstools-3.0.27/debian/control
--- dosfstools-3.0.26/debian/control	2014-10-12 08:10:20.000000000 +0200
+++ dosfstools-3.0.27/debian/control	2014-11-12 03:18:31.000000000 +0100
@@ -1,12 +1,12 @@
 Source: dosfstools
 Section: otherosfs
 Priority: optional
-Maintainer: Debian QA Group <packages@qa.debian.org>
+Maintainer: Andreas Bombe <aeb@debian.org>
 Build-Depends: debhelper (>= 9)
 Standards-Version: 3.9.6
-Homepage: http://daniel-baumann.ch/software/dosfstools/
-Vcs-Browser: http://daniel-baumann.ch/gitweb/?p=debian/packages/dosfstools.git
-Vcs-Git: git://daniel-baumann.ch/git/debian/packages/dosfstools.git
+Homepage: https://github.com/dosfstools/dosfstools
+Vcs-Browser: http://anonscm.debian.org/cgit/collab-maint/dosfstools.git/
+Vcs-Git: git://anonscm.debian.org/collab-maint/dosfstools.git
 
 Package: dosfstools
 Architecture: linux-any
diff -Nru dosfstools-3.0.26/debian/copyright dosfstools-3.0.27/debian/copyright
--- dosfstools-3.0.26/debian/copyright	2014-04-25 20:44:16.000000000 +0200
+++ dosfstools-3.0.27/debian/copyright	2014-11-12 02:37:52.000000000 +0100
@@ -1,7 +1,7 @@
 Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
 Upstream-Name: dosfstools
-Upstream-Contact: Daniel Baumann <mail@daniel-baumann.ch>
-Source: http://daniel-baumann.ch/files/software/dosfstools/
+Upstream-Contact: Andreas Bombe <aeb@debian.org>
+Source: https://github.com/dosfstools/dosfstools
 
 Files: *
 Copyright: 1991 Linus Torvalds <torvalds@klaava.helsinki.fi>
diff -Nru dosfstools-3.0.26/debian/watch dosfstools-3.0.27/debian/watch
--- dosfstools-3.0.26/debian/watch	2014-10-12 08:08:42.000000000 +0200
+++ dosfstools-3.0.27/debian/watch	2014-11-12 03:17:55.000000000 +0100
@@ -1,3 +1,2 @@
 version=3
-http://daniel-baumann.ch/software/dosfstools/ .*/dosfstools-(\d\S+)\.tar\.(?:bz2|gz|xz)
-
+https://github.com/dosfstools/dosfstools/releases .*/v\d\S*/dosfstools-(\d\S*)\.tar\.(?:xz|gz|bz2)
diff -Nru dosfstools-3.0.26/src/boot.c dosfstools-3.0.27/src/boot.c
--- dosfstools-3.0.26/src/boot.c	2014-01-17 07:06:54.000000000 +0100
+++ dosfstools-3.0.27/src/boot.c	2014-11-12 01:10:37.000000000 +0100
@@ -504,7 +504,7 @@
 	    offset = cluster_start(fs, cluster);
 	    for (i = 0; i * sizeof(DIR_ENT) < fs->cluster_size; i++) {
 		fs_read(offset, sizeof(DIR_ENT), de);
-		if (de->attr & ATTR_VOLUME)
+		if (de->attr != VFAT_LN_ATTR && de->attr & ATTR_VOLUME)
 		    return offset;
 		offset += sizeof(DIR_ENT);
 	    }
@@ -513,7 +513,7 @@
 	for (i = 0; i < fs->root_entries; i++) {
 	    offset = fs->root_start + i * sizeof(DIR_ENT);
 	    fs_read(offset, sizeof(DIR_ENT), de);
-	    if (de->attr & ATTR_VOLUME)
+	    if (de->attr != VFAT_LN_ATTR && de->attr & ATTR_VOLUME)
 		return offset;
 	}
     }
diff -Nru dosfstools-3.0.26/src/check.c dosfstools-3.0.27/src/check.c
--- dosfstools-3.0.26/src/check.c	2014-03-07 18:35:11.000000000 +0100
+++ dosfstools-3.0.27/src/check.c	2014-11-12 01:10:37.000000000 +0100
@@ -959,9 +959,9 @@
 	fs_read(offset, sizeof(DIR_ENT), &de);
     else {
 	/* Construct a DIR_ENT for the root directory */
+	memset(&de, 0, sizeof de);
 	memcpy(de.name, "           ", MSDOS_NAME);
 	de.attr = ATTR_DIR;
-	de.size = de.time = de.date = 0;
 	de.start = htole16(fs->root_cluster & 0xffff);
 	de.starthi = htole16((fs->root_cluster >> 16) & 0xffff);
     }
diff -Nru dosfstools-3.0.26/src/fsck.fat.c dosfstools-3.0.27/src/fsck.fat.c
--- dosfstools-3.0.26/src/fsck.fat.c	2014-01-17 07:07:12.000000000 +0100
+++ dosfstools-3.0.27/src/fsck.fat.c	2014-11-12 01:10:37.000000000 +0100
@@ -157,7 +157,6 @@
 	    break;
 	case 'v':
 	    verbose = 1;
-	    printf("fsck.fat " VERSION " (" VERSION_DATE ")\n");
 	    break;
 	case 'V':
 	    verify = 1;
diff -Nru dosfstools-3.0.26/src/version.h dosfstools-3.0.27/src/version.h
--- dosfstools-3.0.26/src/version.h	2014-03-07 18:40:00.000000000 +0100
+++ dosfstools-3.0.27/src/version.h	2014-11-12 01:10:37.000000000 +0100
@@ -23,7 +23,7 @@
 #ifndef _version_h
 #define _version_h
 
-#define VERSION "3.0.26"
-#define VERSION_DATE "2014-03-07"
+#define VERSION "3.0.27"
+#define VERSION_DATE "2014-11-12"
 
 #endif
diff -Nru dosfstools-3.0.26/VERSION dosfstools-3.0.27/VERSION
--- dosfstools-3.0.26/VERSION	2014-03-07 18:39:32.000000000 +0100
+++ dosfstools-3.0.27/VERSION	2014-11-12 01:10:37.000000000 +0100
@@ -1 +1 @@
-3.0.26
+3.0.27


unblock dosfstools/3.0.27-1

--- End Message ---
--- Begin Message ---
On Wed, Nov 12, 2014 at 04:56:38AM +0100, Andreas Bombe wrote:
> Please unblock package dosfstools

Unblocked.

-- 
Jonathan Wiltshire                                      jmw@debian.org
Debian Developer                         http://people.debian.org/~jmw

4096R: 0xD3524C51 / 0A55 B7C5 1223 3942 86EC  74C3 5394 479D D352 4C51

Attachment: signature.asc
Description: Digital signature


--- End Message ---

Reply to: