Skip to content

Commit bc8d591

Browse files
committed
xtensa: ISS: fix call to split_if_spec
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: [email protected] Fixes: 7282bee ("[PATCH] xtensa: Architecture support for Tensilica Xtensa Part 8") Signed-off-by: Max Filippov <[email protected]>
1 parent c44e783 commit bc8d591

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/xtensa/platforms/iss/network.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ static int tuntap_probe(struct iss_net_private *lp, int index, char *init)
237237

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

0 commit comments

Comments
 (0)