Subject: CVE-2024-44949: parisc: fix a possible DMA corruption

From: Greg Kroah-Hartman <[email-masked]>

Description
===========

In the Linux kernel, the following vulnerability has been resolved:

parisc: fix a possible DMA corruption

ARCH_DMA_MINALIGN was defined as 16 - this is too small - it may be
possible that two unrelated 16-byte allocations share a cache line. If
one of these allocations is written using DMA and the other is written
using cached write, the value that was written with DMA may be
corrupted.

This commit changes ARCH_DMA_MINALIGN to be 128 on PA20 and 32 on PA1.1 -
that's the largest possible cache line size.

As different parisc microarchitectures have different cache line size, we
define arch_slab_minalign(), cache_line_size() and
dma_get_cache_alignment() so that the kernel may tune slab cache
parameters dynamically, based on the detected cache line size.

The Linux kernel CVE team has assigned CVE-2024-44949 to this issue.

Affected and fixed versions
===========================

	Fixed in 6.6.46 with commit 642a0b7453da
	Fixed in 6.10.5 with commit 533de2f470ba
	Fixed in 6.11 with commit 7ae04ba36b38

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-44949
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:
	arch/parisc/Kconfig
	arch/parisc/include/asm/cache.h

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/642a0b7453daff0295310774016fcb56d1f5bc7f
	https://git.kernel.org/stable/c/533de2f470baac40d3bf622fe631f15231a03c9f
	https://git.kernel.org/stable/c/7ae04ba36b381bffe2471eff3a93edced843240f