Message ID | 20230824110603.1266826-3-cengiz.can@canonical.com |
---|---|
State | New |
Headers | show
Return-Path: <kernel-team-bounces@lists.ubuntu.com> 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=lSp3bse3; 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 4RWgJ61JvFz1yh2 for <incoming@patchwork.ozlabs.org>; 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 <kernel-team-bounces@lists.ubuntu.com>) id 1qZ8AP-0006Q5-2F; Thu, 24 Aug 2023 11:06:21 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from <cengiz.can@canonical.com>) id 1qZ8AN-0006Pu-D9 for kernel-team@lists.ubuntu.com; Thu, 24 Aug 2023 11:06:19 +0000 Received: from mail-ej1-f72.google.com (mail-ej1-f72.google.com [209.85.218.72]) (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-0.canonical.com (Postfix) with ESMTPS id 3E1583F533 for <kernel-team@lists.ubuntu.com>; Thu, 24 Aug 2023 11:06:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1692875179; bh=kudPyBnGuOTxxQ2hqQFHrkmHeCYQ/mKbV0xF6CiWfWc=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=lSp3bse3usf3N6882DBjcOgLNVkPMNi4fNJeGcP3fNOf5tbELs/qsT5ZCaB3Nmqtu uGeNQy6KuVu6bR1Vq8GoOsANYiZuO397zgEMxPDlUIYWDiHP8bNvljYuIREAplhQTF rsiJ75JnPYcMThRDFB1t31I1qR7CxPldkz0mikvBLvr2NPOmvGejVm7tb7YaDOKIBH oXHB1AunUJhJMIX5COOtkfbzyJa3JpKlO5xGt239jy2dUroUf4kj3KhErwRw24G2rJ v1piFvCG/ta3UjiDXp2q2E/oUSXvG2xvkku0TLIrudgp0pIdjlivNQReFyjDJdLHuu XCCHtLBT+QPqA== Received: by mail-ej1-f72.google.com with SMTP id a640c23a62f3a-94a355cf318so502409566b.2 for <kernel-team@lists.ubuntu.com>; Thu, 24 Aug 2023 04:06:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692875178; x=1693479978; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=kudPyBnGuOTxxQ2hqQFHrkmHeCYQ/mKbV0xF6CiWfWc=; b=C4LDzZWSG6wPuNxPpSRBDKdVgerfXn/8FjcZIdCAD7KrkZKGSxtUIrnyd+1n8YU/wj qX2qxZll3pG6B0WjsF/0iUyvxDGOHS6eG/E4jb+w6perCnqVvr7io/EqeNhsVNQtXgJZ Ru9TUo1QlPhgPbn6Yu2jqI4ASAaRWK2BMpRvdndpY8uWZh9cwmZl8+c9epSDdV4p4gWT CeDPcahJgfy+Qrw7WAuCy3TVTOlO4tyyxPWSNMyXJ89PBMl3zVWOzFJAGNIakJKgoDQy DOLpNxIAdZesRr+zN8on9Lr7oVzW95z+kWTWf9C6OJJ2CFEJSKLkk34/3OJecMcqUDuI n6Ww== X-Gm-Message-State: AOJu0YwFMOfhM8PmZ7N63M2d4a5jZ3cr2C1YHMvDs1OhLiW5v2ZYBg+5 1KbsdMaWBoF7Ybsts2pwCd/nGoLbnomSbmufE+RN6BHUXTLJejrqATkpYh0cD3MtCcBfZkDnVEL RMdRXgwctE/6C+KhRucUHH+SdAuyq0++fPvsw9omGI830uWiHD6J0 X-Received: by 2002:a17:906:8a50:b0:9a1:fab3:ee43 with SMTP id gx16-20020a1709068a5000b009a1fab3ee43mr1949107ejc.0.1692875178598; Thu, 24 Aug 2023 04:06:18 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFSvFUKGqwfr7JS+jY13CfwgbNJ5Or8zrovhvZacsuIcCtyPd98/Hrz4s0FJdrRIqzNUtZmvA== X-Received: by 2002:a17:906:8a50:b0:9a1:fab3:ee43 with SMTP id gx16-20020a1709068a5000b009a1fab3ee43mr1949098ejc.0.1692875178375; Thu, 24 Aug 2023 04:06:18 -0700 (PDT) Received: from localhost ([24.133.89.143]) by smtp.gmail.com with ESMTPSA id v15-20020a170906564f00b0099cbe71f3b5sm10757161ejr.0.2023.08.24.04.06.17 for <kernel-team@lists.ubuntu.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 24 Aug 2023 04:06:18 -0700 (PDT) From: Cengiz Can <cengiz.can@canonical.com> To: kernel-team@lists.ubuntu.com Subject: [SRU OEM-6.0 2/3] tun: tun_chr_open(): correctly initialize socket uid Date: Thu, 24 Aug 2023 14:06:02 +0300 Message-Id: <20230824110603.1266826-3-cengiz.can@canonical.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230824110603.1266826-1-cengiz.can@canonical.com> References: <20230824110603.1266826-1-cengiz.can@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions <kernel-team.lists.ubuntu.com> List-Unsubscribe: <https://lists.ubuntu.com/mailman/options/kernel-team>, <mailto:kernel-team-request@lists.ubuntu.com?subject=unsubscribe> List-Archive: <https://lists.ubuntu.com/archives/kernel-team> List-Post: <mailto:kernel-team@lists.ubuntu.com> List-Help: <mailto:kernel-team-request@lists.ubuntu.com?subject=help> List-Subscribe: <https://lists.ubuntu.com/mailman/listinfo/kernel-team>, <mailto:kernel-team-request@lists.ubuntu.com?subject=subscribe> Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" <kernel-team-bounces@lists.ubuntu.com> |
Series |
CVE-2023-1076
|
expand
|
diff --git a/drivers/net/tun.c b/drivers/net/tun.c index 3387074a2bdb..7fd539387e80 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c @@ -3447,7 +3447,7 @@ static int tun_chr_open(struct inode *inode, struct file * file) tfile->socket.file = file; tfile->socket.ops = &tun_socket_ops; - sock_init_data(&tfile->socket, &tfile->sk); + sock_init_data_uid(&tfile->socket, &tfile->sk, inode->i_uid); tfile->sk.sk_write_space = tun_sock_write_space; tfile->sk.sk_sndbuf = INT_MAX;