From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.208.200 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796054672; b=oM/x5/t1aHZiqPkQgNgRoEDMjAX91hi+7S0rPwJQIvZP6Oeu+URpFSlGAll9MgJcITO8 fRUn3VKiJ+v77CsxVkcV8mNmFGjxSByZzRsYZBjysrjuA484Zg/XAbkD8zX6K6if3/T2X CinjyhKUdlrBR3/VR86Jfng8j3TYPrc/GSxqtD8+4aVmrr8m/xJ5pDZKxn7/7ICGxk+g7 zP8jxoeqDAj+yEoRYcZvKDgQhpbTeHVHWXsysTjxrK0dOXZW+5ZK7qtHyxyJmIgcOh5zw 0CYo/EnBbamxZMRN1JgBZEvzXbRQGJl0GktvlFEYeXxZ2ZDtqTz1tROizmvsRLuoXtQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796054672; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Received:Date:In-Reply-To: Mime-Version:References:X-Mailer:Message-ID:Subject:From:To:Cc: Content-Type; bh=yy9Xxj7MdP5IKLi+odU6Etbu445muEPQp7Nfq0TOJ+g=; b=wnQ4UwJDFY8hvymeAfLYAf5QNwhvk2cm0hrSsrFjGKWfOFfsyJVkEHVYIuR9/lNQQDoL j+nBcc1JzDSaNRGeAUkuZVvWJniOHgbxJKaH+Ed205htBrJPNsnPVFxZ6LsI866J0mser Uy6jkCgYmFG229flN2ZQ2RfFiO2QIylBaDK/Huhgc9wovh6OByaKLC35aKc4SVcTEAC5s sdzIpR/lm8uyEatgWs2khDhfCK6BsqptCpmwWPfDkOj7XIV5XUS/iElAnFZX2GHHzv5j1 4aLIpYSCEkj3tCzz7M51mnBw3xJqYlgNSnng4gFaysV7pBmJwYnqNG5eIR9PQwA0XVg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=google.com; spf=pass smtp.mailfrom=flex--dmnk.bounces.google.com; dkim=pass header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=HUpeeGaU; arc=none smtp.remote-ip=209.85.208.200 Received: from mail-lj1-f200.google.com (mail-lj1-f200.google.com [209.85.208.200]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3345E606A32D for ; Mon, 30 Nov 2026 16:04:32 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 3345E606A32D Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--dmnk.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.a=rsa-sha256 header.s=20260707 header.b=HUpeeGaU Received: by mail-lj1-f200.google.com with SMTP id 38308e7fff4ca-3ad36e654f1so10286581fa.3 for ; Mon, 30 Nov 2026 08:04:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20260707; t=1796054670; x=1796659470; darn=vger.kernel.org; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:from:to:cc:subject:date:message-id:reply-to :content-type; bh=yy9Xxj7MdP5IKLi+odU6Etbu445muEPQp7Nfq0TOJ+g=; b=HUpeeGaUesQ6E6VdJh2N6y4IaANrM5rkSbV68V3cLUIdgQyzY2QRQGIfjaT9XPxQ4N fw8PKK8Xp7rzYslcNhqdzGRZ68F6OanKN9/ensrD9boD+Qlg1TNc8PtzUKiiUTM08ZmR geYDS+GmnpmBNuXq7Xe8Rf9B5dNKZcXoRfCIW7w4HCzlmsPWUhuEO/1ZL46gyXAIDy1K KnMV3zBveSS0sBOjwyKUp0Jo2IZ6MVrFKQDMvo60mmRivPI7nI99LlRvzgJrhriNDNI3 OkQzGRNg4pf9+g8c+Tg36vRLFLXmrwUpay+z2fn6z7PlL4x/JqohBqnOS8XAfq8L3TSH D1mQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796054670; x=1796659470; h=content-type:cc:to:from:subject:message-id:references:mime-version :in-reply-to:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=yy9Xxj7MdP5IKLi+odU6Etbu445muEPQp7Nfq0TOJ+g=; b=NGRIQqA/WIgNMvwoV0mH9ryQ9BZyO9+Jv2sy0PVERSnN30JKlHD4SDVDmXSWI7zx2n YqiDGbWs6cCtQzhAEYiTJtL1cW/pLHqiG8hiq+9kgzN26t91HNlnD+tlf+2AbVQfLlLg qhdTURc7YT9iD+73VRt8V95BQll/owKmXJbec463W8CGgno/J9xiua5eT3LhEx3gqYaN nQsKcQf8Oa0e8smanKzgyLi4YP5L4ufjHg1B2DYPeflZ+IQBqCdt4LssVUoV2sZ4vTfn BKJQFJGwhT529MEFsHNtU7jpCU24duOsETIpBt1cHOowTGVbsBmRbWV5zDVJaWO4O2KS JwVA== X-Forwarded-Encrypted: i=1; AL+hErH6E/q5SnlgUdzinUZQo4FxXSDPJjbrXVBqegBOcoU+khhlfnBFCsTkok+16NWyKQfI5XHjUlg=@vger.kernel.org X-Gm-Message-State: APuU4Z/UNq1Afypfx7iv2udZ7iwOs1d8PtB9cVLO9i5EtVu1i3KTMc+E aTbfRAp3tvHgRpS0BG81T6b3p06Os1o3OttnqFNzZu4nr9dU6HhHYTCFTTyTi6s6OUs6aXqXRA= = X-Received: from wrmj17.prod.google.com ([2002:adf:e511:0:b0:4a3:d052:79d8]) (user=dmnk job=prod-delivery.src-stubby-dispatcher) by 2002:a05:6512:400c:b0:5c3:3a8b:9e8 with SMTP id 2adb3069b0e04-5c33a8b0b9dmr4102780e87.63.1796054670029; Mon, 30 Nov 2026 08:04:30 -0800 (PST) Date: Mon, 30 Nov 2026 17:04:28 +0100 In-Reply-To: <179589258952.3135.7000335148299611948@kernel.org> X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Mime-Version: 1.0 References: <20261124180603.72523-1-dmnk@google.com> <179589258952.3135.7000335148299611948@kernel.org> X-Mailer: git-send-email 2.56.1.911.g883d8bcb20-goog Message-ID: <20261130160429.2655219-1-dmnk@google.com> Subject: Re: [PATCH net v2] udp: preserve explicit sk_bound_dev_if across __udp_disconnect() From: Dominik Maier To: netdev-bot+sashiko@kernel.org Cc: Dominik Maier , Willem de Bruijn , Eric Dumazet , Kuniyuki Iwashima , Paolo Abeni , "David S. Miller" , Jakub Kicinski , Simon Horman , David Ahern , netdev@vger.kernel.org, dmnk+artist@google.com Content-Type: text/plain; charset="UTF-8" On Sat, 28 Nov 2026 19:03:09 +0000, netdev-bot+sashiko@kernel.org wrote: > - [Medium] Every IPv6 bind() path still lets an unprivileged user change > sk_bound_dev_if, with no CAP_NET_RAW check and no L3-scope check. > - [Medium] ping_bind() changes sk->sk_bound_dev_if without holding the > socket lock, and on its -EINVAL path it never restores the old value. Thanks. On ping_bind(), moving the scoped sk_bound_dev_if update under lock_sock() after the inet_num == 0 check (and restoring with WRITE_ONCE() if ping_get_port() fails) fixes both the lockless store and the -EINVAL leak. On IPv6 scoped bind(), the scope_id override is long-standing intentional behavior and separate from AF_UNSPEC disconnect zeroing sk_bound_dev_if; v3 narrows the commit message accordingly. pw-bot: cr