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] [day] [month] [year] [list]
Message-ID: <Z9qRkkLhFOK7Pl2F@codewreck.org>
Date: Wed, 19 Mar 2025 18:42:42 +0900
From: Dominique Martinet <asmadeus@...ewreck.org>
To: Christian Schoenebeck <linux_oss@...debyte.com>
Cc: Eric Van Hensbergen <ericvh@...nel.org>,
	Latchesar Ionkov <lucho@...kov.net>, v9fs@...ts.linux.dev,
	linux-kernel@...r.kernel.org, Robert Morris <rtm@....edu>
Subject: Re: [PATCH v2] 9p/net: fix improper handling of bogus negative
 read/write replies

Christian Schoenebeck wrote on Wed, Mar 19, 2025 at 10:20:05AM +0100:
> > -		p9_debug(P9_DEBUG_9P, ">>> TWRITE fid %d offset %llu count %d (/%d)\n",
> > +		p9_debug(P9_DEBUG_9P, ">>> TWRITE fid %d offset %llu count %zu (/%zu)\n",
> >  			 fid->fid, offset, rsize, count);
> 
>   p9_debug(P9_DEBUG_9P, ">>> TWRITE fid %d offset %llu count %u (/%zu)\n",
>            fid->fid, offset, rsize, count);
> >  		if (rsize < written) {
> > -			pr_err("bogus RWRITE count (%d > %d)\n", written, rsize);
> > +			pr_err("bogus RWRITE count (%u > %zu)\n", written, rsize);
> 
>   pr_err("bogus RWRITE count (%u > %u)\n", written, rsize);

(Right, got these two as they cause a warning with W=1)

> >  int p9_client_readdir(struct p9_fid *fid, char *data, u32 count, u64 offset)
> >  {
> > -	int err, rsize, non_zc = 0;
> > +	int err, non_zc = 0;
> > +	u32 rsize;
> >  	struct p9_client *clnt;
> >  	struct p9_req_t *req;
> >  	char *dataptr;
> 
> Missing change for:
> 
>   p9_debug(P9_DEBUG_9P, ">>> TREADDIR fid %d offset %llu count %u",
>            fid->fid, offset, count);

Oh, this one doesn't seem to cause a warning.
I guess it doesn't matter much unless we get something > 2^31 but might
as well fix, sending as a v2

-- 
Dominique

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ