From patchwork Tue Sep 24 15:29:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Massimiliano Pellizzer X-Patchwork-Id: 1988991 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 4XCkMG5PRDz1xst for ; Wed, 25 Sep 2024 01:30:18 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=lists.ubuntu.com) by lists.ubuntu.com with esmtp (Exim 4.86_2) (envelope-from ) id 1st7UK-0004MT-7L; Tue, 24 Sep 2024 15:30:04 +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 1st7UI-0004LN-0Z for kernel-team@lists.ubuntu.com; Tue, 24 Sep 2024 15:30:02 +0000 Received: from mail-lf1-f72.google.com (mail-lf1-f72.google.com [209.85.167.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-1.canonical.com (Postfix) with ESMTPS id 4CA753F4BE for ; Tue, 24 Sep 2024 15:30:01 +0000 (UTC) Received: by mail-lf1-f72.google.com with SMTP id 2adb3069b0e04-5365b801741so5176856e87.2 for ; Tue, 24 Sep 2024 08:30:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1727191800; x=1727796600; 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=1ZMkLf7kpvPSVugfdaiALFORMF+qxoiiXqtJ7A/EIAI=; b=vV7+yWwE8uFjKSQ0ynCOw44D2n1ibGyIFI7v5P2simEPBkkUwCZu2UX2qgF/9yhfhr ChqYy/T/ZqPpmyjSwqNzzC79cUAtMO7iELmHInivhb1bDnB5+7MX+u/w0SBo/QnPxYVU 1UBR9x2iRnrFenu4ID1a0oYeRMZPOZCqblVaMdgwWmhUdmtQFngODXDKKmhb+6/Lib+i lm7JFyQMstrcidJuUHy7W9bIq50jwb9H3DxD1mJyK2SZeqD8Ez//IMkEiz3DJc8Bp0sa YvIF6Q6GdOkfmCOMyVbowWumAQvG6SgMsKzgNRyYtAflYmYMoQL8gybw3gzdERW3fD5m 9v2Q== X-Gm-Message-State: AOJu0Yz9XuvTy/cNp9+FiK3Eg9IvcpoZqBSX8svRiETg+vyOAHOv/x05 /Lk0hwWt+r6XWGkpu026zyWy9Ewl8lNfWw0WAB4Mi1LYhfjiwhr7f+f4Jf5a4gLJegjF109k+o1 AVYRiaAnLDcjcOup92IajORhum9cphgEoLpPtjyFgoYINU+F2JXRR0vVg6zo5qf2DQ5WGOHnNrm MGdnx01eropg== X-Received: by 2002:a05:6512:12cc:b0:536:542e:ce1f with SMTP id 2adb3069b0e04-536ac2e6fb1mr12273622e87.18.1727191800244; Tue, 24 Sep 2024 08:30:00 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFu9NCaNB4A3QYV2W67T9/Ii3nsudPV4/aFaFN4uSB7LaTH8mWcE2oxQ/1bK4F9nH9K8AzDYQ== X-Received: by 2002:a05:6512:12cc:b0:536:542e:ce1f with SMTP id 2adb3069b0e04-536ac2e6fb1mr12273585e87.18.1727191799810; Tue, 24 Sep 2024 08:29:59 -0700 (PDT) Received: from framework-canonical.station (net-93-71-67-9.cust.vodafonedsl.it. [93.71.67.9]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a9392f50078sm96304066b.59.2024.09.24.08.29.59 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 24 Sep 2024 08:29:59 -0700 (PDT) From: Massimiliano Pellizzer To: kernel-team@lists.ubuntu.com Subject: [SRU][J][PATCH 0/1] CVE-2023-52621 Date: Tue, 24 Sep 2024 17:29:11 +0200 Message-ID: <20240924152936.233013-1-massimiliano.pellizzer@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] bpf: Check rcu_read_lock_trace_held() before calling bpf map helpers The three bpf_map_{lookup,update,delete}_elem() helper functions are also available for sleepable bpf programs, the patch adds the corresponding lock assertion for sleepable bpf programs. [Fix] Noble: Fixed Jammy: Backported the fix commit from linux-6.1.y Focal: Not affected Bionic: Not affected Xenial: Not affected [Test Case] Compile tested. [Where problems could occur] The fix for CVE-2023-52621 affetcs the BPF subsystem, in particular the handling of BPF map operations in sleepable BPF programs. A bug in the patch could lead to kernel warnings or crashes when using BPF maps, especially when BPF JIT is disabled. Hou Tao (1): bpf: Check rcu_read_lock_trace_held() before calling bpf map helpers kernel/bpf/helpers.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) Acked-by: Mehmet Basaran Acked-by: Chris Chiu Acked-by: Chris Chiu