From patchwork Mon Oct 28 07:41:37 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Koichiro Den X-Patchwork-Id: 2003136 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=185.125.189.65; helo=lists.ubuntu.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=patchwork.ozlabs.org) Received: from lists.ubuntu.com (lists.ubuntu.com [185.125.189.65]) (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 4XcQMq6Dwsz1xwF for ; Mon, 28 Oct 2024 18:42:30 +1100 (AEDT) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1t5KOI-0002gm-7a; Mon, 28 Oct 2024 07:42:18 +0000 Received: from smtp-relay-internal-1.internal ([10.131.114.114] helo=smtp-relay-internal-1.canonical.com) by lists.ubuntu.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1t5KOG-0002gY-FN for kernel-team@lists.ubuntu.com; Mon, 28 Oct 2024 07:42:16 +0000 Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) (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 2B4B33F2A2 for ; Mon, 28 Oct 2024 07:42:16 +0000 (UTC) Received: by mail-pl1-f200.google.com with SMTP id d9443c01a7336-20c3d9a0eb2so52909435ad.0 for ; Mon, 28 Oct 2024 00:42:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1730101334; x=1730706134; 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=KohqVA9lZmPLPFlVYpqsF20kc3vwU/Yi1YsSXlxHfXQ=; b=r4mL2Nn2nlu7smoOI7BU1VS7dcdsXfbKvrtr3g5K2+BCbqt6Ueg0mC6FKFvkrqQ2P3 9VNtY8343rla7JRYOh+kVrh93GCoVtB6CjeLAfXniiE4JTMWgTjXfifcQeuBZsa1wOdL 39s0hwzmREKQOU1CZPijojCyYWHBv8dudd6zgMWA4XhRiHno/2yae6SbpSiyqsqTmOYT eFPdfCClbsjfhmfD0/d2hGLjsXGkJhNUFiVTnSyRjyx24xB+XUjgCeJaGjEjajiGtacc ZntQZxopWQcLGryIow/qn7cJA41NLunocFPDvZQkAroy+xqlKP4ek3mlRYln2zt4Pz7F THTQ== X-Gm-Message-State: AOJu0YyuflgxBtof1o1KqCbJDBBdyXhssXqR9RjrozCAO+Vq4XvtlyVK 1PnBUXwdOrC+1WKGBtIVLm8EgwAS85xs+DKPh98Cg4LMPGaMijn3CRlVjl012YJ3LCwn46+jV/0 wNGbmhZ9aj8+C3WORpSNKx9e+j0NPkTGHz1ZXVcdZpnqhKtaoNXLvUABOPn2VrAKsRyDMinRmeB QV3/bEu1xnqA== X-Received: by 2002:a17:903:2b06:b0:20c:5ba1:e8e5 with SMTP id d9443c01a7336-210c6c16f09mr90706235ad.19.1730101333977; Mon, 28 Oct 2024 00:42:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEJW3qiaYFWdgJW3BSAm1W9UqAA01t5yR4KnnT66rjXtBPrGv8xrxtuk9mmxf31iTWeQ0p2fQ== X-Received: by 2002:a17:903:2b06:b0:20c:5ba1:e8e5 with SMTP id d9443c01a7336-210c6c16f09mr90706045ad.19.1730101333509; Mon, 28 Oct 2024 00:42:13 -0700 (PDT) Received: from localhost.localdomain ([240f:74:7be:1:fc2f:5f77:13cb:653f]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-210bc0167f3sm45344785ad.150.2024.10.28.00.42.12 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Oct 2024 00:42:13 -0700 (PDT) From: Koichiro Den To: kernel-team@lists.ubuntu.com Subject: [SRU][F][PATCH v2 0/3] CVE-2021-47101 Date: Mon, 28 Oct 2024 16:41:37 +0900 Message-ID: <20241028074150.112511-1-koichiro.den@canonical.com> X-Mailer: git-send-email 2.43.0 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] asix: fix uninit-value in asix_mdio_read() asix_read_cmd() may read less than sizeof(smsr) bytes and in this case smsr will be uninitialized. Fail log: BUG: KMSAN: uninit-value in asix_check_host_enable drivers/net/usb/asix_common.c:82 [inline] BUG: KMSAN: uninit-value in asix_check_host_enable drivers/net/usb/asix_common.c:82 [inline] drivers/net/usb/asix_common.c:497 BUG: KMSAN: uninit-value in asix_mdio_read+0x3c1/0xb00 drivers/net/usb/asix_common.c:497 drivers/net/usb/asix_common.c:497 asix_check_host_enable drivers/net/usb/asix_common.c:82 [inline] asix_check_host_enable drivers/net/usb/asix_common.c:82 [inline] drivers/net/usb/asix_common.c:497 asix_mdio_read+0x3c1/0xb00 drivers/net/usb/asix_common.c:497 drivers/net/usb/asix_common.c:497 [Fix] Noble: not affected Jammy: fixed via stable Focal: Clean cherry-pick following two prereq commits backporting Bionic: fix sent to esm ML Xenial: not affected Trusty: not affected [Test Case] Compile tested / Smatch tested on the changed file (with amd64 generic config) [*] [*]: warn message found, which is irrelevant to the CVE backport. $ kchecker drivers/net/usb/asix_common.c --(snip)-- CHECK drivers/net/usb/asix_common.c drivers/net/usb/asix_common.c:634 asix_get_eeprom() warn: potential spectre issue 'eeprom_buff' [w] [Where problems could occur] This backport affects those who use ASIX USB Ethernet devices, an issue with it would be visible to the user via unpredicted system behavior or a system crash especially if some sort of regression will be found for the prerequisite fix commit in the future. [Notes] v2: - Pull a follow-up fix commit from upstream that fixes the first prerequisite commit "net: asix: fix uninit value bugs". Also, fix [Impact] section in this cover letter. Pavel Skripkin (3): net: asix: fix uninit value bugs asix: fix wrong return value in asix_check_host_enable() asix: fix uninit-value in asix_mdio_read() drivers/net/usb/asix_common.c | 73 ++++++++++++++++------------------- 1 file changed, 33 insertions(+), 40 deletions(-) Acked-by: Manuel Diewald Acked-by: Guoqing Jiang