Subject: CVE-2024-44968: tick/broadcast: Move per CPU pointer access into the atomic section

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

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

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

tick/broadcast: Move per CPU pointer access into the atomic section

The recent fix for making the take over of the broadcast timer more
reliable retrieves a per CPU pointer in preemptible context.

This went unnoticed as compilers hoist the access into the non-preemptible
region where the pointer is actually used. But of course it's valid that
the compiler keeps it at the place where the code puts it which rightfully
triggers:

  BUG: using smp_processor_id() in preemptible [00000000] code:
       caller is hotplug_cpu__broadcast_tick_pull+0x1c/0xc0

Move it to the actual usage site which is in a non-preemptible region.

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

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

	Issue introduced in 6.1.103 with commit 408bfb6b0a7f and fixed in 6.1.105 with commit 7b3ec186ba93
	Issue introduced in 6.6.44 with commit 3a58c590f6bd and fixed in 6.6.46 with commit b9d604933d5f
	Issue introduced in 6.10.3 with commit 2cdab4b4bf77 and fixed in 6.10.5 with commit 7dd12f85f150

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-44968
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:
	kernel/time/tick-broadcast.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/f54abf332a2bc0413cfa8bd6a8511f7aa99faea0
	https://git.kernel.org/stable/c/f91fb47ecacc178a83a77eeebd25cbaec18c01d6
	https://git.kernel.org/stable/c/668c6c4a7e9e9f081c06b70f30104fb7013437ed
	https://git.kernel.org/stable/c/541a900d245536d4809cb1aa322c3fcc2cdb58a6
	https://git.kernel.org/stable/c/7b3ec186ba93e333e9efe7254e7e31c1828e5d2d
	https://git.kernel.org/stable/c/b9d604933d5fd72dd37f24e1dc35f778297d745a
	https://git.kernel.org/stable/c/7dd12f85f150010ef7518201c63fa7e395f5c3e9
	https://git.kernel.org/stable/c/6881e75237a84093d0986f56223db3724619f26e