Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 597eb525 authored by Max Filippov's avatar Max Filippov Committed by Greg Kroah-Hartman
Browse files

xtensa: ISS: fix call to split_if_spec



commit bc8d5916541fa19ca5bc598eb51a5f78eb891a36 upstream.

split_if_spec expects a NULL-pointer as an end marker for the argument
list, but tuntap_probe never supplied that terminating NULL. As a result
incorrectly formatted interface specification string may cause a crash
because of the random memory access. Fix that by adding NULL terminator
to the split_if_spec argument list.

Cc: stable@vger.kernel.org
Fixes: 7282bee7 ("[PATCH] xtensa: Architecture support for Tensilica Xtensa Part 8")
Signed-off-by: default avatarMax Filippov <jcmvbkbc@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e8482952
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -231,7 +231,7 @@ static int tuntap_probe(struct iss_net_private *lp, int index, char *init)


	init += sizeof(TRANSPORT_TUNTAP_NAME) - 1;
	init += sizeof(TRANSPORT_TUNTAP_NAME) - 1;
	if (*init == ',') {
	if (*init == ',') {
		rem = split_if_spec(init + 1, &mac_str, &dev_name);
		rem = split_if_spec(init + 1, &mac_str, &dev_name, NULL);
		if (rem != NULL) {
		if (rem != NULL) {
			pr_err("%s: extra garbage on specification : '%s'\n",
			pr_err("%s: extra garbage on specification : '%s'\n",
			       dev->name, rem);
			       dev->name, rem);