From patchwork Thu Aug 24 11:06:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cengiz Can X-Patchwork-Id: 1825319 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=lKHIAlr5; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4RWgJ60SnMz1yfF for ; Thu, 24 Aug 2023 21:06:28 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1qZ8AI-0006PE-Kw; Thu, 24 Aug 2023 11:06:14 +0000 Received: from smtp-relay-internal-1.internal ([10.131.114.114] helo=smtp-relay-internal-1.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1qZ8AF-0006P7-Ob for kernel-team@lists.ubuntu.com; Thu, 24 Aug 2023 11:06:11 +0000 Received: from mail-ej1-f71.google.com (mail-ej1-f71.google.com [209.85.218.71]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 4DFC83F0BA for ; Thu, 24 Aug 2023 11:06:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1692875171; bh=fGm3uofGeHpvq7qC4ZjtEOTgAjPrXt36drK8Uz3XUxk=; h=From:To:Subject:Date:Message-Id:MIME-Version; b=lKHIAlr5TMAMZYXhs2OVxDYLn1nReS8wzhitjuf8s4F6I9rIzYOKOBJca0Pbs5kwX 5BUW1hTWc+oEpRdI8OpqtsBiCwItyAILBEr1PT+48KPuHLLzQgkKGa3DE16cA+R4pj DDKmN41E746TrbQD3o+yFlIw0hVGWuZejSFgwWhWKOWxkpE0Jln8GCUbTD+x+e3uL6 BYIQuinI5BiQztfAhaPXRxIIPOdKPVWTXcFtj7R8Fn40DVCqS0An7S/femMNtqVY6v l3dlTOWZGU43OC6jXXpmFk2iCJgU3pJyU69w7lY7PUR0dAcCwdfrQNtv1l+A/fVKX9 EVDND7SyDGlPA== Received: by mail-ej1-f71.google.com with SMTP id a640c23a62f3a-99bc8f1290eso465300266b.3 for ; Thu, 24 Aug 2023 04:06:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692875170; x=1693479970; h=content-transfer-encoding:mime-version:message-id:date:subject:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=fGm3uofGeHpvq7qC4ZjtEOTgAjPrXt36drK8Uz3XUxk=; b=CRDd+vU7r6auaV6/3Yao2VTnYJ9RU3TqkcFVuq0mLf4uwXwlSH1SzMkofYAef6mJnW gmDx4BNdMoFvrnI0zUKfI3eavV1Fk0KJT1Jk6wCdQ3K4ngnDE4lXUHko+1LgMDW/kuWq BcjjFQH5UkXyZfFa63Ys0tOoQ7UmBFIOQQptRvq+DvDePdFweSmPTfHsVlX39PD/7flT +rjxXs8c0bcY+LWPnh1WG00iaKp5YsdYCVgQaMBGXXTrMPaiV7LRM98KvfLZc+cvJnQv wzFzrICvkssbZqXwCsUP7rKpPBKr7MyuiqxOmSKL1PK9hldBR8OjuSAzuI0jimeX5UTA uRWA== X-Gm-Message-State: AOJu0Yx/YcauVz6YBsrbS8nxqWGlYKccSmCdhAy64xbRg7naFObYr0g/ tOxij+u4hIIu4EQyyi990s42f8KBhWOsS1dzg6FzCANpC7NkMdRAGm6wrwNoJCTj0P8xey0fLqV Se0w4PMExTv9D7mCuanQWmV8S96+0hXNjoQJrAknr76knCmNQ4Rxm X-Received: by 2002:a17:906:3018:b0:99c:ad52:b00 with SMTP id 24-20020a170906301800b0099cad520b00mr11015315ejz.6.1692875170783; Thu, 24 Aug 2023 04:06:10 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEmKTozq/095DxhjhZ6G0JtPOTohH6CMchH0lY1v29UaT4VUr+/YTaL44HAtMq87h1m2TsvuQ== X-Received: by 2002:a17:906:3018:b0:99c:ad52:b00 with SMTP id 24-20020a170906301800b0099cad520b00mr11015308ejz.6.1692875170501; Thu, 24 Aug 2023 04:06:10 -0700 (PDT) Received: from localhost ([24.133.89.143]) by smtp.gmail.com with ESMTPSA id s13-20020a170906354d00b009a16975ee5asm9896628eja.169.2023.08.24.04.06.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Aug 2023 04:06:10 -0700 (PDT) From: Cengiz Can To: kernel-team@lists.ubuntu.com Subject: [SRU OEM-6.0 0/3] CVE-2023-1076 Date: Thu, 24 Aug 2023 14:06:00 +0300 Message-Id: <20230824110603.1266826-1-cengiz.can@canonical.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" [Impact] A flaw was found in the Linux Kernel. The tun/tap sockets have their socket UID hardcoded to 0 due to a type confusion in their initialization function. While it will be often correct, as tuntap devices require CAP_NET_ADMIN, it may not always be the case, e.g., a non-root user only having that capability. This would make tun/tap sockets being incorrectly treated in filtering/routing decisions, possibly bypassing network filters. [Fix] Cherry picked from upstream. [Test case] Compile, boot and basic tunctl functionality tested. [Potential regression] CVE-2023-4194 is a followup for this so this has a high regression potential. Pietro Borrello (3): net: add sock_init_data_uid() tun: tun_chr_open(): correctly initialize socket uid tap: tap_open(): correctly initialize socket uid drivers/net/tap.c | 2 +- drivers/net/tun.c | 2 +- include/net/sock.h | 7 ++++++- net/core/sock.c | 15 ++++++++++++--- 4 files changed, 20 insertions(+), 6 deletions(-) Acked-by: Roxana Nicolescu Acked-by: Tim Gardner