Unverified Commit 22835887 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files

!9893 bonding: Fix out-of-bounds read in bond_option_arp_ip_targets_set()

parents 4f47261d ab700f9e
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1100,9 +1100,9 @@ static int bond_option_arp_ip_targets_set(struct bonding *bond,
	__be32 target;

	if (newval->string) {
		if (!in4_pton(newval->string+1, -1, (u8 *)&target, -1, NULL)) {
			netdev_err(bond->dev, "invalid ARP target %pI4 specified\n",
				   &target);
		if (strlen(newval->string) < 1 ||
		    !in4_pton(newval->string + 1, -1, (u8 *)&target, -1, NULL)) {
			netdev_err(bond->dev, "invalid ARP target specified\n");
			return ret;
		}
		if (newval->string[0] == '+')