Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package exfatprogs for openSUSE:Factory checked in at 2021-11-20 22:47:53 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/exfatprogs (Old) and /work/SRC/openSUSE:Factory/.exfatprogs.new.1895 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "exfatprogs" Sat Nov 20 22:47:53 2021 rev:10 rq:932251 version:1.1.3 Changes: -------- --- /work/SRC/openSUSE:Factory/exfatprogs/exfatprogs.changes 2021-06-05 23:30:46.864359610 +0200 +++ /work/SRC/openSUSE:Factory/.exfatprogs.new.1895/exfatprogs.changes 2021-11-20 22:48:10.987831833 +0100 @@ -1,0 +2,11 @@ +Thu Nov 18 08:37:16 UTC 2021 - Paolo Stivanin <i...@paolostivanin.com> + +- update to 1.1.3: + * mkfs.exfat: ensure that the cluster size is greater than or + equal than the sector size. + * mkfs.exfat: replace lseek() + write() with pwrite(). + * mkfs.exfat: prevent an integer overflow when computing the FAT + length. + * fsck.exfat: fix a double free memory error. + +------------------------------------------------------------------- Old: ---- exfatprogs-1.1.2.tar.xz exfatprogs-1.1.2.tar.xz.asc New: ---- exfatprogs-1.1.3.tar.xz exfatprogs-1.1.3.tar.xz.asc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ exfatprogs.spec ++++++ --- /var/tmp/diff_new_pack.VBMJxU/_old 2021-11-20 22:48:11.535830017 +0100 +++ /var/tmp/diff_new_pack.VBMJxU/_new 2021-11-20 22:48:11.535830017 +0100 @@ -17,7 +17,7 @@ Name: exfatprogs -Version: 1.1.2 +Version: 1.1.3 Release: 0 Summary: Utilities for exFAT file system maintenance License: GPL-2.0-or-later ++++++ exfatprogs-1.1.2.tar.xz -> exfatprogs-1.1.3.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/exfatprogs-1.1.2/COPYING new/exfatprogs-1.1.3/COPYING --- old/exfatprogs-1.1.2/COPYING 2021-05-20 06:45:37.705119168 +0200 +++ new/exfatprogs-1.1.3/COPYING 2021-11-17 10:13:55.729267514 +0100 @@ -56,7 +56,7 @@ The precise terms and conditions for copying, distribution and modification follow. - GNU GENERAL PUBLIC LICENSE + GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains @@ -277,9 +277,9 @@ PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. - END OF TERMS AND CONDITIONS + END OF TERMS AND CONDITIONS - How to Apply These Terms to Your New Programs + How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/exfatprogs-1.1.2/Makefile.in new/exfatprogs-1.1.3/Makefile.in --- old/exfatprogs-1.1.2/Makefile.in 2021-05-20 06:46:00.144854030 +0200 +++ new/exfatprogs-1.1.3/Makefile.in 2021-11-17 10:14:34.118613976 +0100 @@ -198,7 +198,7 @@ $(top_srcdir)/build-aux/install-sh \ $(top_srcdir)/build-aux/ltmain.sh \ $(top_srcdir)/build-aux/missing COPYING NEWS build-aux/compile \ - build-aux/config.guess build-aux/config.sub \ + build-aux/config.guess build-aux/config.sub build-aux/depcomp \ build-aux/install-sh build-aux/ltmain.sh build-aux/missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/exfatprogs-1.1.2/NEWS new/exfatprogs-1.1.3/NEWS --- old/exfatprogs-1.1.2/NEWS 2021-05-20 06:45:37.705119168 +0200 +++ new/exfatprogs-1.1.3/NEWS 2021-11-17 10:13:55.729267514 +0100 @@ -1,3 +1,16 @@ +exfatprogs 1.1.3 - released 2021-11-11 +====================================== + +CHANGES : + * mkfs.exfat: ensure that the cluster size is greater than or + equal than the sector size. + * mkfs.exfat: replace lseek() + write() with pwrite(). + +BUG FIXES : + * mkfs.exfat: prevent an integer overflow when computing the FAT + length. + * fsck.exfat: fix a double free memory error. + exfatprogs 1.1.2 - released 2021-05-20 ====================================== diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/exfatprogs-1.1.2/README.md new/exfatprogs-1.1.3/README.md --- old/exfatprogs-1.1.2/README.md 2021-05-20 06:45:37.705119168 +0200 +++ new/exfatprogs-1.1.3/README.md 2021-11-17 10:13:55.729267514 +0100 @@ -116,4 +116,4 @@ ## Contributor information * Please base your pull requests on the `exfat-next` branch. -* Make sure you add 'Signed-Off' information to your commits (e. g. `git commit --signoff`). +* Make sure you add 'Signed-Off' information to your commits (e.g. `git commit --signoff`). diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/exfatprogs-1.1.2/configure new/exfatprogs-1.1.3/configure --- old/exfatprogs-1.1.2/configure 2021-05-20 06:45:59.584860605 +0200 +++ new/exfatprogs-1.1.3/configure 2021-11-17 10:14:16.734016170 +0100 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.69 for exfatprogs 1.1.2. +# Generated by GNU Autoconf 2.69 for exfatprogs 1.1.3. # # Report bugs to <linkinj...@kernel.org>. # @@ -590,8 +590,8 @@ # Identity of this package. PACKAGE_NAME='exfatprogs' PACKAGE_TARNAME='exfatprogs' -PACKAGE_VERSION='1.1.2' -PACKAGE_STRING='exfatprogs 1.1.2' +PACKAGE_VERSION='1.1.3' +PACKAGE_STRING='exfatprogs 1.1.3' PACKAGE_BUGREPORT='linkinj...@kernel.org' PACKAGE_URL='https://github.com/exfatprogs/exfatprogs' @@ -1325,7 +1325,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures exfatprogs 1.1.2 to adapt to many kinds of systems. +\`configure' configures exfatprogs 1.1.3 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1396,7 +1396,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of exfatprogs 1.1.2:";; + short | recursive ) echo "Configuration of exfatprogs 1.1.3:";; esac cat <<\_ACEOF @@ -1508,7 +1508,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -exfatprogs configure 1.1.2 +exfatprogs configure 1.1.3 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. @@ -1786,7 +1786,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by exfatprogs $as_me 1.1.2, which was +It was created by exfatprogs $as_me 1.1.3, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ @@ -2654,7 +2654,7 @@ # Define the identity of the package. PACKAGE='exfatprogs' - VERSION='1.1.2' + VERSION='1.1.3' cat >>confdefs.h <<_ACEOF @@ -13256,7 +13256,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by exfatprogs $as_me 1.1.2, which was +This file was extended by exfatprogs $as_me 1.1.3, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -13323,7 +13323,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -exfatprogs config.status 1.1.2 +exfatprogs config.status 1.1.3 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/exfatprogs-1.1.2/fsck/fsck.c new/exfatprogs-1.1.3/fsck/fsck.c --- old/exfatprogs-1.1.2/fsck/fsck.c 2021-05-20 06:45:37.705119168 +0200 +++ new/exfatprogs-1.1.3/fsck/fsck.c 2021-11-17 10:13:55.729267514 +0100 @@ -261,7 +261,7 @@ /* * get references of ancestors that include @child until the count of - * ancesters is not larger than @count and the count of characters of + * ancestors is not larger than @count and the count of characters of * their names is not larger than @max_char_len. * return true if root is reached. */ @@ -1477,6 +1477,11 @@ shift += 10; } + if (i >= sizeof(units)/sizeof(units[0])) { + i = i - 1; + shift = shift - 10; + } + quoti = (unsigned int)(bytes / (1ULL << shift)); remain = 0; if (shift > 0) { @@ -1596,8 +1601,10 @@ goto err; ret = init_exfat(exfat, bs); - if (ret) + if (ret) { + exfat = NULL; goto err; + } if (exfat_mark_volume_dirty(exfat, true)) { ret = -EIO; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/exfatprogs-1.1.2/include/libexfat.h new/exfatprogs-1.1.3/include/libexfat.h --- old/exfatprogs-1.1.2/include/libexfat.h 2021-05-20 06:45:37.705119168 +0200 +++ new/exfatprogs-1.1.3/include/libexfat.h 2021-11-17 10:13:55.729267514 +0100 @@ -34,7 +34,7 @@ #define VOLUME_LABEL_BUFFER_SIZE (VOLUME_LABEL_MAX_LEN*MB_LEN_MAX+1) -/* Upcase tabel macro */ +/* Upcase table macro */ #define EXFAT_UPCASE_TABLE_SIZE (5836) /* Flags for tune.exfat and exfatlabel */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/exfatprogs-1.1.2/include/list.h new/exfatprogs-1.1.3/include/list.h --- old/exfatprogs-1.1.2/include/list.h 2021-05-20 06:45:37.705119168 +0200 +++ new/exfatprogs-1.1.3/include/list.h 2021-11-17 10:13:55.729267514 +0100 @@ -84,7 +84,6 @@ __list_add(new, head->prev, head); } - /* * Delete a list entry by making the prev/next entries * point to each other. @@ -111,8 +110,6 @@ entry->prev = LIST_POISON2; } - - /** * list_del_init - deletes entry from list and reinitialize it. * @entry: the element to delete from the list. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/exfatprogs-1.1.2/include/version.h new/exfatprogs-1.1.3/include/version.h --- old/exfatprogs-1.1.2/include/version.h 2021-05-20 06:45:37.705119168 +0200 +++ new/exfatprogs-1.1.3/include/version.h 2021-11-17 10:13:55.729267514 +0100 @@ -5,6 +5,6 @@ #ifndef _VERSION_H -#define EXFAT_PROGS_VERSION "1.1.2" +#define EXFAT_PROGS_VERSION "1.1.3" #endif /* !_VERSION_H */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/exfatprogs-1.1.2/lib/libexfat.c new/exfatprogs-1.1.3/lib/libexfat.c --- old/exfatprogs-1.1.2/lib/libexfat.c 2021-05-20 06:45:37.705119168 +0200 +++ new/exfatprogs-1.1.3/lib/libexfat.c 2021-11-17 10:13:55.729267514 +0100 @@ -475,8 +475,7 @@ int ret; unsigned long long offset = sec_off * bd->sector_size; - lseek(bd->dev_fd, offset, SEEK_SET); - ret = read(bd->dev_fd, buf, bd->sector_size); + ret = pread(bd->dev_fd, buf, bd->sector_size, offset); if (ret < 0) { exfat_err("read failed, sec_off : %u\n", sec_off); return -1; @@ -490,8 +489,7 @@ int bytes; unsigned long long offset = sec_off * bd->sector_size; - lseek(bd->dev_fd, offset, SEEK_SET); - bytes = write(bd->dev_fd, buf, bd->sector_size); + bytes = pwrite(bd->dev_fd, buf, bd->sector_size, offset); if (bytes != (int)bd->sector_size) { exfat_err("write failed, sec_off : %u, bytes : %d\n", sec_off, bytes); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/exfatprogs-1.1.2/mkfs/mkfs.c new/exfatprogs-1.1.3/mkfs/mkfs.c --- old/exfatprogs-1.1.2/mkfs/mkfs.c 2021-05-20 06:45:37.705119168 +0200 +++ new/exfatprogs-1.1.3/mkfs/mkfs.c 2021-11-17 10:13:55.733267659 +0100 @@ -46,14 +46,14 @@ struct bsx64 *pbsx = &ppbr->bsx; unsigned int i; - /* Fill exfat BIOS paramemter block */ + /* Fill exfat BIOS parameter block */ pbpb->jmp_boot[0] = 0xeb; pbpb->jmp_boot[1] = 0x76; pbpb->jmp_boot[2] = 0x90; memcpy(pbpb->oem_name, "EXFAT ", 8); memset(pbpb->res_zero, 0, 53); - /* Fill exfat extend BIOS paramemter block */ + /* Fill exfat extend BIOS parameter block */ pbsx->vol_offset = cpu_to_le64(bd->offset / bd->sector_size); pbsx->vol_length = cpu_to_le64(bd->size / bd->sector_size); pbsx->fat_offset = cpu_to_le32(finfo.fat_byte_off / bd->sector_size); @@ -235,9 +235,9 @@ unsigned long long offset) { int nbyte; + off_t fat_entry_offset = finfo.fat_byte_off + (offset * sizeof(__le32)); - lseek(fd, finfo.fat_byte_off + (offset * sizeof(__le32)), SEEK_SET); - nbyte = write(fd, (__u8 *) &clu, sizeof(__le32)); + nbyte = pwrite(fd, (__u8 *) &clu, sizeof(__le32), fat_entry_offset); if (nbyte != sizeof(int)) { exfat_err("write failed, offset : %llu, clu : %x\n", offset, clu); @@ -321,8 +321,7 @@ for (i = 0; i < finfo.used_clu_cnt - EXFAT_FIRST_CLUSTER; i++) exfat_set_bit(bd, bitmap, i); - lseek(bd->dev_fd, finfo.bitmap_byte_off, SEEK_SET); - nbytes = write(bd->dev_fd, bitmap, finfo.bitmap_byte_len); + nbytes = pwrite(bd->dev_fd, bitmap, finfo.bitmap_byte_len, finfo.bitmap_byte_off); if (nbytes != finfo.bitmap_byte_len) { exfat_err("write failed, nbytes : %d, bitmap_len : %d\n", nbytes, finfo.bitmap_byte_len); @@ -359,8 +358,7 @@ ed[2].upcase_start_clu = cpu_to_le32(finfo.ut_start_clu); ed[2].upcase_size = cpu_to_le64(EXFAT_UPCASE_TABLE_SIZE); - lseek(bd->dev_fd, finfo.root_byte_off, SEEK_SET); - nbytes = write(bd->dev_fd, ed, dentries_len); + nbytes = pwrite(bd->dev_fd, ed, dentries_len, finfo.root_byte_off); if (nbytes != dentries_len) { exfat_err("write failed, nbytes : %d, dentries_len : %d\n", nbytes, dentries_len); @@ -440,6 +438,11 @@ unsigned long long total_clu_cnt; int clu_len; + if (ui->cluster_size < bd->sector_size) { + exfat_err("cluster size (%u bytes) is smaller than sector size (%u bytes)\n", + ui->cluster_size, bd->sector_size); + return -1; + } if (ui->boundary_align < bd->sector_size) { exfat_err("boundary alignment is too small (min %d)\n", bd->sector_size); @@ -447,8 +450,12 @@ } finfo.fat_byte_off = round_up(bd->offset + 24 * bd->sector_size, ui->boundary_align) - bd->offset; - finfo.fat_byte_len = round_up((bd->num_clusters * sizeof(int)), - ui->cluster_size); + /* Prevent integer overflow when computing the FAT length */ + if (bd->num_clusters > UINT32_MAX / 4) { + exfat_err("cluster size (%u bytes) is too small\n", ui->cluster_size); + return -1; + } + finfo.fat_byte_len = round_up((bd->num_clusters * 4), ui->cluster_size); finfo.clu_byte_off = round_up(bd->offset + finfo.fat_byte_off + finfo.fat_byte_len, ui->boundary_align) - bd->offset; if (bd->size <= finfo.clu_byte_off) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/exfatprogs-1.1.2/mkfs/upcase.c new/exfatprogs-1.1.3/mkfs/upcase.c --- old/exfatprogs-1.1.2/mkfs/upcase.c 2021-05-20 06:45:37.705119168 +0200 +++ new/exfatprogs-1.1.3/mkfs/upcase.c 2021-11-17 10:13:55.733267659 +0100 @@ -506,8 +506,7 @@ { int nbytes; - lseek(bd->dev_fd, finfo.ut_byte_off, SEEK_SET); - nbytes = write(bd->dev_fd, upcase_table, EXFAT_UPCASE_TABLE_SIZE); + nbytes = pwrite(bd->dev_fd, upcase_table, EXFAT_UPCASE_TABLE_SIZE, finfo.ut_byte_off); if (nbytes != EXFAT_UPCASE_TABLE_SIZE) return -1;