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]
Date:   Tue, 11 Jul 2017 16:22:59 +0100
From:   David Howells <dhowells@...hat.com>
To:     viro@...iv.linux.org.uk
Cc:     dhowells@...hat.com, Dan Carpenter <dan.carpenter@...cle.com>,
        linux-fsdevel@...r.kernel.org, Jan Kara <jack@...e.cz>,
        linux-kernel@...r.kernel.org
Subject: [PATCH] isofs: Fix isofs_show_options()

Hi Al,

The isofs patch needs a small fix to handle a signed/unsigned comparison that
the compiler didn't flag - thanks to Dan for catching it.

It should be noted, however, as mentioned in a previous email, the session
number handing appears to be incorrect between where it is parsed and where it
is used.

David
---
isofs: Fix isofs_show_options()

isofs_show_options() compares sbi->s_session to -1, but s_session is an
unsigned char, so the comparison isn't right.  Compare against 255 instead.

Further, 1 needs subtracting from the session number to counteract the
increment in the option parser.

Reported-by: Dan Carpenter <dan.carpenter@...cle.com>
Signed-off-by: David Howells <dhowells@...hat.com>
---
diff --git a/fs/isofs/inode.c b/fs/isofs/inode.c
index f80ee600d1bc..add72c995f90 100644
--- a/fs/isofs/inode.c
+++ b/fs/isofs/inode.c
@@ -492,7 +492,7 @@ static int isofs_show_options(struct seq_file *m, struct dentry *root)
 
 	if (sbi->s_check)		seq_printf(m, ",check=%c", sbi->s_check);
 	if (sbi->s_mapping)		seq_printf(m, ",map=%c", sbi->s_mapping);
-	if (sbi->s_session != -1)	seq_printf(m, ",session=%u", sbi->s_session);
+	if (sbi->s_session != 255)	seq_printf(m, ",session=%u", sbi->s_session - 1);
 	if (sbi->s_sbsector != -1)	seq_printf(m, ",sbsector=%u", sbi->s_sbsector);
 
 	if (root->d_sb->s_blocksize != 1024)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ