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-next>] [day] [month] [year] [list]
Message-Id: <1195464645.29063.12.camel@elijah.suse.cz>
Date:	Mon, 19 Nov 2007 10:30:45 +0100
From:	Petr Tesarik <ptesarik@...e.cz>
To:	linux-cifs-client@...ts.samba.org
Cc:	Steve French <smfrench@...il.com>, linux-kernel@...r.kernel.org
Subject: [CIFS] still incorrect cifs_reconnect fix?

Hi,

while merging commits f01d5e14e764b14b6bf5512678523d009254b209 and
638b250766272fcaaa0f7ed2776f58f4ac701914 into SLES10, I've noticed that
there's apparently a bug. The code currently looks like this:

		pdu_length = 4; /* enough to get RFC1001 header */
incomplete_rcv:
		length =
		    kernel_recvmsg(csocket, &smb_msg,
				&iov, 1, pdu_length, 0 /* BB other flags? */);

/* ... some irrelevant code left out ... */

		} else if (length < 4) {	/* <----- HERE IS THE PROBLEM
			cFYI(1, ("less than four bytes received (%d bytes)",
			      length));
			pdu_length -= length;
			msleep(1);
			goto incomplete_rcv;
		}

I think we should be checking for length < pdu_length, not for length <
4, because if we read 2 bytes in the first run and 2 bytes in the second
un, CIFS will still treat the second run as incomplete (and possibly run
in an infinite loop). Am I missing something obvious?

Kind regards,
Petr Tesarik

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ