]> git.baikalelectronics.ru Git - kernel.git/commit
CIFS: fix wrapping bugs in num_entries()
authorDan Carpenter <dan.carpenter@oracle.com>
Thu, 6 Sep 2018 09:48:22 +0000 (12:48 +0300)
committerSteve French <stfrench@microsoft.com>
Wed, 12 Sep 2018 14:32:07 +0000 (09:32 -0500)
commit8cd72fc39bd315ab43fa6d2fbbcb0020d84bb962
tree1f35fa87689fcfdb7eead9d9e0b12164ce384e33
parent0d2b3129752c9cf69f42d7eb486b1ca1c2159581
CIFS: fix wrapping bugs in num_entries()

The problem is that "entryptr + next_offset" and "entryptr + len + size"
can wrap.  I ended up changing the type of "entryptr" because it makes
the math easier when we don't have to do so much casting.

Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Reviewed-by: Aurelien Aptel <aaptel@suse.com>
Reviewed-by: Pavel Shilovsky <pshilov@microsoft.com>
CC: Stable <stable@vger.kernel.org>
fs/cifs/smb2pdu.c