Skip to content

Commit

Permalink
xtensa: ISS: fix call to split_if_spec
Browse files Browse the repository at this point in the history
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: 7282bee ("[PATCH] xtensa: Architecture support for Tensilica Xtensa Part 8")
Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
  • Loading branch information
Max Filippov committed Jul 11, 2023
1 parent c44e783 commit bc8d591
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion arch/xtensa/platforms/iss/network.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ static int tuntap_probe(struct iss_net_private *lp, int index, char *init)

init += sizeof(TRANSPORT_TUNTAP_NAME) - 1;
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) {
pr_err("%s: extra garbage on specification : '%s'\n",
dev->name, rem);
Expand Down

0 comments on commit bc8d591

Please sign in to comment.