lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <6FF7A658-00C4-4185-A182-E9895E704A3E@dilger.ca>
Date:	Fri, 1 Aug 2014 08:38:30 +0200
From:	Andreas Dilger <adilger@...ger.ca>
To:	Theodore Ts'o <tytso@....edu>
Cc:	Ext4 Developers List <linux-ext4@...r.kernel.org>,
	Azat Khuzhin <a3at.mail@...il.com>,
	Eric Sandeen <sandeen@...hat.com>
Subject: Re: [PATCH] tune2fs: fix uninitialized variable in remove_journal_device

On Jul 31, 2014, at 17:53, Theodore Ts'o <tytso@....edu> wrote:
> 
> This bug was introduced by commit 7dfefaf413bbd ("tune2fs: update
> journal super block when changing UUID for fs").
> 
> Fixes-Coverity-Bug: 1229243
> 
> Reported-by: Eric Sandeen <sandeen@...hat.com>
> Signed-off-by: Theodore Ts'o <tytso@....edu>
> ---
> misc/tune2fs.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/misc/tune2fs.c b/misc/tune2fs.c
> index 0c1feb1..639809d 100644
> --- a/misc/tune2fs.c
> +++ b/misc/tune2fs.c
> @@ -232,7 +232,6 @@ static int remove_journal_device(ext2_filsys fs)
>    errcode_t    retval;
>    int        commit_remove_journal = 0;
>    io_manager    io_ptr;
> -    int start;
> 
>    if (f_flag)
>        commit_remove_journal = 1; /* force removal even if error */
> @@ -286,8 +285,9 @@ static int remove_journal_device(ext2_filsys fs)
>    jsb->s_nr_users = htonl(nr_users);
> 
>    /* Write back the journal superblock */
> -    if ((retval = io_channel_write_blk64(jfs->io, start,
> -        -SUPERBLOCK_SIZE, buf))) {
> +    if ((retval = io_channel_write_blk64(jfs->io,
> +                ext2fs_journal_sb_start(fs->blocksize),
> +                -SUPERBLOCK_SIZE, buf))) {

Better to also remove assignment in conditional check. 

Cheers, Andreas

>        com_err(program_name, retval,
>            "while writing journal superblock.");
>        goto no_valid_journal;
> -- 
> 2.0.0
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
> the body of a message to majordomo@...r.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ