Re: Is the handling of the isofs session= mount option wrong?

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

 



On Tue 11-07-17 13:46:08, David Howells wrote:
> Hmmm...  The isofs session option code looks dodgy.  It's parsed like this:
> 
> 		case Opt_session:
> 			if (match_int(&args[0], &option))
> 				return 0;
> 			n = option;
> 			if (n > 99)
> 				return 0;
> 			popt->session = n + 1;		<--- increment
> 			break;
> 
> and then used like this:
> 
> 	if(session >= 0 && session <= 99) {
> 
> but popt->session is either -1 or in the range 1-100.

So I did some digging in the standards and in ECMA-130 standard I have
found that the track numbers are supposed to be 1-99. So I suppose the
check in option parsing should be more restrictive (not allowing n=99).

The check in isofs_get_last_session() should probably just be session > 0
as the boundary checks are already done during option parsing. Not that
any of this would really matter in practice but I guess I'll queue a patch
when I did all the reading...

								Honza
-- 
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR



[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux