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

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

parents a4c42527 dfc576f2
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1093,9 +1093,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] == '+')