Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 58367171083 for ; Fri, 21 Jun 2024 10:25:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718965518; cv=none; b=gpuRcVe3TBoZ5Ex7D3EUaum3tKmtRi0aSQkNUslv3KDnTqGC1RQQuWhBgemMrThoYAluEiQOqP0xYYHR/w/EY2e0YyJo5TgGqyFwHNgNbnnJFuHIZptFL8Gx42n0cuH/RBuGH3zEbyoMCvRBdNXRv1YIGvSvzMgRvYv3Wn2h6Do= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718965518; c=relaxed/simple; bh=HEIdF/MZg2i2I2oaQinR43Rai9S104f/RixRTjMlVYs=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Wam3/mgkq8tE3DCgJcN74DHHT01DaB7yQSY4Z7IhzKIJfP5kRzRKkY9LpwtdjCKlmAhrrfAbdLzg6cTPWPLmuTtgWf4uLmGlk5Pdu4+mUz3mmK1SicCi06HJmG4XuRYkA0y8tE0VsEHRywyF0f8HNwHzPjw9QrIFikLAQCtf5G8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=nYOhIXLE; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="nYOhIXLE" Received: by smtp.kernel.org (Postfix) with ESMTPSA id CDBE1C2BBFC; Fri, 21 Jun 2024 10:25:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1718965518; bh=HEIdF/MZg2i2I2oaQinR43Rai9S104f/RixRTjMlVYs=; h=From:To:Cc:Subject:Date:Reply-to:From; b=nYOhIXLEAHJgZ/CUZvjOcopwZ7x10p464oV88go0oHu0BZYjYgD/xcfZZNNj0e3+p YKjYWkvg1L407WMLpC3aYh16bsN8s8ZgqUkfBvijHhV6rIxmkbE60EozJz07GJrYac Z5QJj1yDf+Gk/kS/0nql+MO8GAv9gJeWg3mAt4hM= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2024-36281: net/mlx5: Use mlx5_ipsec_rx_status_destroy to correctly delete status rules Date: Fri, 21 Jun 2024 12:19:36 +0200 Message-ID: <2024062135-CVE-2024-36281-8446@gregkh> X-Mailer: git-send-email 2.45.2 Precedence: bulk X-Mailing-List: linux-cve-announce@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Reply-to: , X-Developer-Signature: v=1; a=openpgp-sha256; l=3147; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=HEIdF/MZg2i2I2oaQinR43Rai9S104f/RixRTjMlVYs=; b=owGbwMvMwCRo6H6F97bub03G02pJDGmlwdu9ll43/6tz7sxdad9gkeM/zizS7LOxXZXz+LfHj wVhl4/6dMSyMAgyMciKKbJ82cZzdH/FIUUvQ9vTMHNYmUCGMHBxCsBEPiYwzK8oeW8RtusH3xqX MwJlkXMW8S2ormNYcFzyq5JGYXAEo4zhKkE34xmzC7OjAQ== X-Developer-Key: i=gregkh@linuxfoundation.org; a=openpgp; fpr=F4B60CC5BF78C2214A313DCB3147D40DDB2DFB29 Content-Transfer-Encoding: 8bit Description =========== In the Linux kernel, the following vulnerability has been resolved: net/mlx5: Use mlx5_ipsec_rx_status_destroy to correctly delete status rules rx_create no longer allocates a modify_hdr instance that needs to be cleaned up. The mlx5_modify_header_dealloc call will lead to a NULL pointer dereference. A leak in the rules also previously occurred since there are now two rules populated related to status. BUG: kernel NULL pointer dereference, address: 0000000000000000 #PF: supervisor read access in kernel mode #PF: error_code(0x0000) - not-present page PGD 109907067 P4D 109907067 PUD 116890067 PMD 0 Oops: 0000 [#1] SMP CPU: 1 PID: 484 Comm: ip Not tainted 6.9.0-rc2-rrameshbabu+ #254 Hardware name: QEMU Standard PC (Q35 + ICH9, 2009), BIOS Arch Linux 1.16.3-1-1 04/01/2014 RIP: 0010:mlx5_modify_header_dealloc+0xd/0x70 Call Trace: ? show_regs+0x60/0x70 ? __die+0x24/0x70 ? page_fault_oops+0x15f/0x430 ? free_to_partial_list.constprop.0+0x79/0x150 ? do_user_addr_fault+0x2c9/0x5c0 ? exc_page_fault+0x63/0x110 ? asm_exc_page_fault+0x27/0x30 ? mlx5_modify_header_dealloc+0xd/0x70 rx_create+0x374/0x590 rx_add_rule+0x3ad/0x500 ? rx_add_rule+0x3ad/0x500 ? mlx5_cmd_exec+0x2c/0x40 ? mlx5_create_ipsec_obj+0xd6/0x200 mlx5e_accel_ipsec_fs_add_rule+0x31/0xf0 mlx5e_xfrm_add_state+0x426/0xc00 The Linux kernel CVE team has assigned CVE-2024-36281 to this issue. Affected and fixed versions =========================== Issue introduced in 6.6.8 with commit 20af7afcd8b8 and fixed in 6.6.33 with commit b0a15cde37a8 Issue introduced in 6.7 with commit 94af50c0a9bb and fixed in 6.9.4 with commit cc9ac559f2e2 Issue introduced in 6.7 with commit 94af50c0a9bb and fixed in 6.10-rc2 with commit 16d66a4fa81d Please see https://www.kernel.org for a full list of currently supported kernel versions by the kernel community. Unaffected versions might change over time as fixes are backported to older supported kernel versions. The official CVE entry at https://cve.org/CVERecord/?id=CVE-2024-36281 will be updated if fixes are backported, please check that for the most up to date information about this issue. Affected files ============== The file(s) affected by this issue are: drivers/net/ethernet/mellanox/mlx5/core/en_accel/ipsec_fs.c Mitigation ========== The Linux kernel CVE team recommends that you update to the latest stable kernel version for this, and many other bugfixes. Individual changes are never tested alone, but rather are part of a larger kernel release. Cherry-picking individual commits is not recommended or supported by the Linux kernel community at all. If however, updating to the latest release is impossible, the individual changes to resolve this issue can be found at these commits: https://git.kernel.org/stable/c/b0a15cde37a8388e57573686f650a17208ae1212 https://git.kernel.org/stable/c/cc9ac559f2e21894c21ac5b0c85fb24a5cab266c https://git.kernel.org/stable/c/16d66a4fa81da07bc4ed19f4e53b87263c2f8d38