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:	Thu, 14 Mar 2013 06:31:36 +0000
From:	"Berg, Johannes" <johannes.berg@...el.com>
To:	Ben Hutchings <ben@...adent.org.uk>,
	"Grumbach, Emmanuel" <emmanuel.grumbach@...el.com>
CC:	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"stable@...r.kernel.org" <stable@...r.kernel.org>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: RE: [ 031/100] iwlwifi: always copy first 16 bytes of commands

> > >  	/* and copy the data that needs to be copied */
> > >  	cmd_pos = offsetof(struct iwl_device_cmd, payload);
> > > +	copy_size = sizeof(out_cmd->hdr);
> > >  	for (i = 0; i < IWL_MAX_CMD_TFDS; i++) {
> > > -		if (!cmd->len[i])
> > > +		int copy = 0;
> > > +
> > > +		if (!cmd->len)
> > >  			continue;
> >
> > cmd->len is an array, so the new condition is always false.  Shouldn't
> > it be 'if (!cmdlen[i])'?
> 
> To answer myself: no, it should still be 'if (!cmd->len[i])' as this loop needs to
> include input fragments that will be completely copied into the header
> fragment.

Ick, good catch. It luckily doesn't matter as if cmd->len[i] is 0 (in which case we'd continue) the "if (copy)" below saves us in all the different code paths inside the loop. This is still clearly a mistake in the patch though.

I will fix this upstream, I guess you'll want to wait for that for stable? I'll Cc:stable that patch as well.

johannes

Intel GmbH
Dornacher Strasse 1
85622 Feldkirchen/Muenchen, Deutschland
Sitz der Gesellschaft: Feldkirchen bei Muenchen
Geschaeftsfuehrer: Christian Lamprechter, Hannes Schwaderer, Douglas Lusk
Registergericht: Muenchen HRB 47456
Ust.-IdNr./VAT Registration No.: DE129385895
Citibank Frankfurt a.M. (BLZ 502 109 00) 600119052

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ