CVE-2022-27239: mount.cifs: fix length check for ip option parsing
authorJeffrey Bencteux <jbe@improsec.com>
Thu, 17 Mar 2022 16:58:52 +0000 (12:58 -0400)
committerPavel Shilovsky <piastryyy@gmail.com>
Wed, 27 Apr 2022 00:07:40 +0000 (17:07 -0700)
commit007c07fd91b6d42f8bd45187cf78ebb06801139d
tree001b60b8523824fb1f0b55f6d9c8d221a0122b6f
parent8c06dce7d596e478c20bc54bdcec87ad97f80a1b
CVE-2022-27239: mount.cifs: fix length check for ip option parsing

Previous check was true whatever the length of the input string was,
leading to a buffer overflow in the subsequent strcpy call.

Bug: https://bugzilla.samba.org/show_bug.cgi?id=15025

Signed-off-by: Jeffrey Bencteux <jbe@improsec.com>
Reviewed-by: David Disseldorp <ddiss@suse.de>
mount.cifs.c