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 E0B7921660D for ; Wed, 26 Feb 2025 02:24:03 +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=1740536644; cv=none; b=bsB/zog6ChB6908z259F0G31hm6oAGThS5uJ+ypl7r7uHtCtAHp/c+SBgW9O3nSDbFpDVZw8GW1Y3nqW8oT1ZRe+5uItuk35t1A+UJdA5uOWNwg74xErYsARu7i6Z1XevQXIKREItkbqdzWDsadPVFY9gEnaOs8A9gjMqmsZWFw= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1740536644; c=relaxed/simple; bh=VVXkBVWmUn/HBrRkdzMCLbgfENBeZnwK1/nfnYbpD5I=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=tUZ24JJwMIDypsKQz5ICGTePSYsS8yHvZRfEecPghEVWrhEC9DCE16QipIZe0kcACYH9Cyb8sXUPhKAqMt/Mrga5Bcgy1OWJ8A2RkoW6AtxSHbVw0s9KL9wsFNdvK6uE2nMgFK5NwcN9s3PQ77swiJzEowUaqrTCjlMVdAPntKs= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=q35wV9YW; 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="q35wV9YW" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6FE7EC4CEDD; Wed, 26 Feb 2025 02:24:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1740536643; bh=VVXkBVWmUn/HBrRkdzMCLbgfENBeZnwK1/nfnYbpD5I=; h=From:To:Cc:Subject:Date:Reply-to:From; b=q35wV9YWaWUyXTVLWet5pRbGAHFxNWKPSR34WyES99tbVJySHJxWNPEWUnTQNBltU yLBrZUcv5ycUS45dGkY4yqoaHyIF8QSv1+PIxKxtttCOFSzcXPC5fZO93F9aRHU2Mi fuhj/Yk+3At93Ykr/Avs7FnXp7bLLi7GL090QK4I= From: Greg Kroah-Hartman To: linux-cve-announce@vger.kernel.org Cc: Greg Kroah-Hartman Subject: CVE-2022-49569: spi: bcm2835: bcm2835_spi_handle_err(): fix NULL pointer deref for non DMA transfers Date: Wed, 26 Feb 2025 03:22:12 +0100 Message-ID: <2025022606-CVE-2022-49569-3c5b@gregkh> X-Mailer: git-send-email 2.48.1 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=2888; i=gregkh@linuxfoundation.org; h=from:subject:message-id; bh=VVXkBVWmUn/HBrRkdzMCLbgfENBeZnwK1/nfnYbpD5I=; b=owGbwMvMwCRo6H6F97bub03G02pJDOn7qs6JMznmbozedLP9wMOOqhcuwpcfnrE27+0STOt0V fwzlelURywLgyATg6yYIsuXbTxH91ccUvQytD0NM4eVCWQIAxenAExEy4lhfp3jFYV54kbvJ6y7 HpKz3O6n2O1V1xkWLK7YEvDXp/x3L6vU3nmr/xZWPbHyBQA= 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: spi: bcm2835: bcm2835_spi_handle_err(): fix NULL pointer deref for non DMA transfers In case a IRQ based transfer times out the bcm2835_spi_handle_err() function is called. Since commit 1513ceee70f2 ("spi: bcm2835: Drop dma_pending flag") the TX and RX DMA transfers are unconditionally canceled, leading to NULL pointer derefs if ctlr->dma_tx or ctlr->dma_rx are not set. Fix the NULL pointer deref by checking that ctlr->dma_tx and ctlr->dma_rx are valid pointers before accessing them. The Linux kernel CVE team has assigned CVE-2022-49569 to this issue. Affected and fixed versions =========================== Issue introduced in 5.4 with commit 1513ceee70f2bd523e025efe0c715328e1a43ffd and fixed in 5.4.208 with commit 76668d2a2f367d25ff448e6d7087406af7d7bb2b Issue introduced in 5.4 with commit 1513ceee70f2bd523e025efe0c715328e1a43ffd and fixed in 5.10.134 with commit 684896e675edd8b669fd3e9f547c5038222d85bc Issue introduced in 5.4 with commit 1513ceee70f2bd523e025efe0c715328e1a43ffd and fixed in 5.15.58 with commit 58466e05390043d2805685c70f55f3f59711bdf2 Issue introduced in 5.4 with commit 1513ceee70f2bd523e025efe0c715328e1a43ffd and fixed in 5.18.15 with commit 49ffa473218012e765682343de2052eb4c1f06a7 Issue introduced in 5.4 with commit 1513ceee70f2bd523e025efe0c715328e1a43ffd and fixed in 5.19 with commit 4ceaa684459d414992acbefb4e4c31f2dfc50641 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-2022-49569 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/spi/spi-bcm2835.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/76668d2a2f367d25ff448e6d7087406af7d7bb2b https://git.kernel.org/stable/c/684896e675edd8b669fd3e9f547c5038222d85bc https://git.kernel.org/stable/c/58466e05390043d2805685c70f55f3f59711bdf2 https://git.kernel.org/stable/c/49ffa473218012e765682343de2052eb4c1f06a7 https://git.kernel.org/stable/c/4ceaa684459d414992acbefb4e4c31f2dfc50641