Skip to content

[ciq-6.18.y-next] Multiple patches tested (100 commits)#1471

Open
ciq-kernel-automation[bot] wants to merge 108 commits into
ciq-6.18.y-nextfrom
{automation_tmp}_ciq-6.18.y-next
Open

[ciq-6.18.y-next] Multiple patches tested (100 commits)#1471
ciq-kernel-automation[bot] wants to merge 108 commits into
ciq-6.18.y-nextfrom
{automation_tmp}_ciq-6.18.y-next

Conversation

@ciq-kernel-automation

Copy link
Copy Markdown

Summary

This PR has been automatically created after successful completion of all CI stages.

Commit Message(s)

[CIQ] v6.18.3 - rebased configs

CONFIG_SPI_MICROCHIP_CORE is no longer a valid config option in 6.18.3
 spi: microchip: rename driver file and internal identifiers
 Upstream 71c814e98696f2cd53e9e6cef7501c2d667d4c5a
[CIQ] v6.18.7 - rebased configs

Upstream commit 5ba2f0a15564 (mm: introduce deferred freeing for
kernel page tables) was backported which adds new config option
ASYNC_KERNEL_PGTABLE_FREE.  Then upsteam commit e37d5a2d60a3
(iommu/sva: invalidate stale IOTLB entries for kernel address space)
was backported which selects it by default for x86 configs that have
selected IOMMU_SVA (which our x86_64 configs have)
 iommu/sva: invalidate stale IOTLB entries for kernel address space
 Upstream e37d5a2d60a338c5917c45296bac65da1382eda5
[CIQ] v6.18.9 - rebased configs

The config dependency on DEVICE_PRIVATE for DRM_GPUSVM was removed,
causing it to be selected by default for configs with DRM_XE (like ours).
Because DRM_GPUSVM is now enabled, DRM_XE_USERPTR_INVAL_INJECT is valid,
but not selected by default.
 drm, drm/xe: Fix xe userptr in the absence of CONFIG_DEVICE_PRIVATE
 Upstream: bdcdf968be314b6fc8835b99fb4519e7619671e6 upstream.
[CIQ] v6.18.14 - rebased configs

ATH9K_AHB now depends on OF to be selected by default.  x86_64
configs do not have OF.  This is fine since ahb bus is arm only.
 wifi: ath9k: add OF dependency to AHB
 upstream: 125e7b31f041cc0a4ede1e42bef69915f0a63a35
[CIQ] v6.18.17 - rebased configs

WARN_ALL_UNSEEDED_RANDOM was removed completely
 Remove WARN_ALL_UNSEEDED_RANDOM kernel config option
 Upstream: 7dff99b354601dd01829e1511711846e04340a69
configs: Enable INTEL_TDX_HOST for x86_64 configs

There are customers that will need this enabled by default
Import initial dist-git for 6.18.19

kernel.spec: Fix buildid and pkgrelease

This matches the 6.12 spec
Remove gating.yaml

Update sbat templates

We are defining the product as clk so if we ever need to revoke or
deny the cert we can target this specific product
Ensure all qdiscs are in modules-core

by design, kernel-ark blacklists all modules in modules-extra that have
a module alias. Now that qdiscs have their module alias [1], some of them
became blacklisted even if we didn't really intend to: move them back to
kernel-modules to preserve feature parity with other qdiscs (and
previous
releases).
Remove modules-rt-kvm references

We don't have that
Set buildid to .1

And define pkgrelease using buildid.
rocky: generalize rule for kunit and test kmod placement

Rename package to kernel-clk6.18

Remove gemini switch

This comes from kernel-ark and is part of their solution for a
kernel variant that should supplant the factory kernel.  Since thats
not what we want, remove this to avoid any confusion.
Add Provides/Conflicts for non-parallel installable kernel-* packages

Adds Provides and Conflicts tags to kernel-clk6.18-* packages that
cannot be parallel installed with stock Rocky kernel packages:
- kernel-doc
- kernel-headers
- kernel-cross-headers
- kernel-debuginfo-common
- kernel-tools
- kernel-tools-libs
- kernel-tools-libs-devel
- kernel-selftests-internal
Rename tool packages with pkg_suffix and add Provides/Conflicts

Introduce %{pkg_suffix} macro (clk%{patchversion}) and use it for:
- package_name: kernel-%{pkg_suffix}
- tool packages: perf, python3-perf, libperf, rtla, rv
Use gzip for symvers compression to match upstream

Switch Module.symvers compression from the dynamic %compression
macro (xz) to hardcoded gzip -c9, matching the upstream kernel spec.
Also fixes the ghost file permissions from 0644 to 0600.
Add +clk6.18 suffix to kernel version string (uname -r)

Inject +%{pkg_suffix} into KVERREL and the shell-level equivalents
(KernelVer, DevelDir, EXTRAVERSION) so that uname -r shows the CLK
kernel identity, e.g. 6.18.19-1.1.el9_ciq.x86_64+clk6.18.
Add kernel-clk6.18-default package to set default kernel

Consolidate spec version defines and prevent CLK kernel from hijacking boot default

Reduce duplicated version numbers in the spec to single sources of truth:
- kernel_major_minor, kernel_patch, and buildid are the base defines
- specversion, kversion, patchlevel, pkgrelease, specrelease, and
  tarfile_release are all derived from them
- Remove specrpmversion (identical to specversion)
- Add el_version for tarball naming
Rework -default package and clean up tool subpackage naming

Move -default subpackage out of %if %{with_tools} guard so it exists
independently of the tools build flag.  Add Requires(posttrans) on
-core to guarantee vmlinuz is installed before grubby runs.  Add
Provides/Conflicts on kernel-provider(default) for mutual exclusion.
Bundle bindgen-cli from source for Rocky 9.6 builds

The bindgen tool required for kernel Rust support is not packaged in
Rocky Linux 9.6. Replace the bindgen BuildRequires with a bundled
bindgen-cli crate built from vendored source during the RPM build.
[CIQ] v6.18.20 - updated spec

[CIQ] v6.18.21 - updated spec

github actions: Inherit the Kernel CI Automated workflow from main

spec: Skip certificate setup for noarch builds

Update spec for ciq_kernel-6.18.21-2

We've picked up a source code change to fix a kallsym issue and
a spec file change to address noarch builds while secure boot signing
github actions: Use trigger for kernelCI

Signed-off-by: Brett Mastbergen <bmastbergen@ciq.com>
github actions: Trigger kernelCI on ciq-6.18.y-next branches

[CIQ] v6.18.22 - updated spec

spec: Fix posttrans script to handle noarch package expansion

[CIQ] ciq_kernel-6.18.22-2 - updated spec

spec: update branding in package descriptions and log messages

github actions: add RPM build workflow for x86_64 and aarch64

configs: enable legacy iptables/ip6tables support for all architectures

A customer running anetd (Google's GKE networking agent, a fork of
Cilium) reported that their nodes fail to reach Ready status because
anetd fatally exits when it cannot load the ip6_tables, ip6table_filter,
ip6table_mangle, and ip6table_raw kernel modules.
Add generic kernel Provides to spec

Adds 'Provides: kernel = version' to base package for compatibility
with packages depending on generic kernel capability.
Add generic kernel-headers and kernel-devel Provides to spec

Add versioned Provides for kernel-headers, kernel-devel, and
kernel-devel-<arch> so the namespaced CLK packages satisfy the same
dependency capabilities as stock Rocky kernel packages.
bundle_bindgen: add set -e, curl --fail, and SHA256 verification

- Add set -e so the script exits on any command failure
- Add -f (--fail) to curl so HTTP errors are caught
- Verify the downloaded crate against the known SHA256 from crates.io
  before extracting
[CIQ] v6.18.27 - rebased configs

ARM64_ERRATUM_4193714 was added and defaults to y if
you have ARM64 (which our aarch64 configs have)
 arm64: errata: Work around early CME DVMSync acknowledgement
 Upstream: 0baba94a9779c13c857f6efc55807e6a45b1d4e4
[CIQ] v6.18.27 - updated spec

generate_tarball: Also strip leading v from tags

[CIQ] v6.18.28 - updated spec

[CIQ] ciq_kernel-6.18.28-2 - updated spec

[CIQ] v6.18.31 - updated spec

[CIQ] v6.18.33 - updated spec

bundle_bindgen: add User-Agent header to crates.io request

crates.io returns 403 for API requests without a User-Agent header.
[CIQ] ciq_kernel-6.18.33-2 - updated spec

kernel-clk6.18: require ciq-kmod and ship %clk_version macro file

- Add Requires: ciq-kmod to the main meta package
- Install macros.kernel-clk6.18-<ver>-<rel> into %{buildroot}/usr/lib/rpm/macros.d/
  during BuildKernel() (base variant only); defines %clk_version for kmod builds
- Versioned filename avoids collisions when multiple installonly devel packages coexist
- Ship as a real file in kernel-clk6.18-devel (no ghost, no scriptlets)
random: Add hook to override device reads and getrandom(2)

commit-author Herbert Xu <herbert.xu@redhat.com>
commit 6892c65de813d311f20443401e528b4dc56872ff
commit-source https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10
crypto: rng - Override drivers/char/random in FIPS mode

commit-author Herbert Xu <herbert.xu@redhat.com>
commit 8b0beca705b3877e24cccdd672422c66bbd75635
commit-source https://gitlab.com/cki-project/kernel-ark
not upstream: Disable vdso getrandom when FIPS is enabled

commit-author Herbert Xu <herbert.xu@redhat.com>
commit 248b8056b11ed8e4b9004f401c75b7c72c3b27e4
commit-source https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10
crypto: ecdh - implement FIPS PCT

commit -
commit-source https://build.opensuse.org/public/source/SUSE:SLE-15-SP6:GA/kernel-source/patches.suse.tar.bz2
commit-patch-path patches.suse/crypto-ecdh-implement-FIPS-PCT.patch
crypto: essiv - Zeroize keys on exit in essiv_aead_setkey()

In essiv_aead_setkey(), use the same logic as crypto_authenc_esn_setkey()
to zeroize keys on exit.
crypto: drbg - Align buffers to at least a cache line

None of the ciphers used by the DRBG have an alignment requirement; thus,
they all return 0 from .crypto_init, resulting in inconsistent alignment
across all buffers.
mm/gup: introduce pin_user_pages_fast_only()

Like pin_user_pages_fast(), but with the internal-only FOLL_FAST_ONLY flag.
crypto: rng - Convert crypto_default_rng_refcnt into an unsigned int

There is no reason this refcount should be a signed int. Convert it to an
unsigned int, thereby also making it less likely to ever overflow.
crypto: rng - Fix priority inversions due to mutex locks

Since crypto_devrandom_read_iter() is invoked directly by user tasks and is
accessible by every task in the system, there are glaring priority
inversions on crypto_reseed_rng_lock and crypto_default_rng_lock.
crypto: rng - Implement fast per-CPU DRBG instances

When the kernel is booted with fips=1, the RNG exposed to userspace is
hijacked away from the CRNG and redirects to crypto_devrandom_read_iter(),
which utilizes the DRBG.
lib/crypto: Add FIPS self-tests for SHA-1 and SHA-2

commit-author Eric Biggers <ebiggers@kernel.org>
commit 04cadb4fe0341304741ef60a297366b553f0ce36
byteorder: Add le64_to_cpu_array() and cpu_to_le64_array()

commit-author Eric Biggers <ebiggers@kernel.org>
commit c99d30706043481a1d631bbd9c7a4b70fe002a2b
lib/crypto: blake2b: Add BLAKE2b library functions

commit-author Eric Biggers <ebiggers@kernel.org>
commit 23a16c9533ed92cc639c8f5bd9eb104809fe2919
btrfs: switch to library APIs for checksums

commit-author Eric Biggers <ebiggers@kernel.org>
commit fe11ac191ce0ad910f6fda0c628bcff19fcff47d
upstream-diff |
    NB. This was a back-port not a cherry-pick as some of
    the underlying code had been changed in prior upstream
    commits: cc38d178ff33543cdb0bd58cfbb9a7c41372ff75
	btrfs: enable large data folio support under CONFIG_BTRFS_EXPERIMENTAL
    and commit: 62bcbdca0ea9b1add9c22f400b51c56184902053
	btrfs: make btrfs_csum_one_bio() handle bs > ps without large folios
    and others unknown.
    These changes were judged too large to bring back
    from upstream as they are CONFIG_BTRFS_EXPERIMENTAL.
crypto: testmgr - block Crypto API xxhash64 in FIPS mode

commit-author Joachim Vandersmissen <git@jvdsn.com>
commit -
commit-source https://lore.kernel.org/linux-crypto/20260303060509.246038-1-git@jvdsn.com/
When in fips mode, self-test errors must panic.

Requested by the lab.
When in fips mode, self-test errors must panic.

Requested by the lab.
Change CONFIG_CRYPTO_JITTERENTROPY_OSR from 1 to 3 in all configs.

Retquested by the lab.
dh_compute_value misses the check SP800-56Arev3, 5.6.2.1.4 which is typically implemented after dh_is_pubkey_valid.

Requested by lab.
In crypto_kdf108_ctr_generate() there is no minimum length check for the digest to be generated - it must be at least 112 bits.

Requested by the lab.
Add fips_approved flag to SHA1 and HMAC-SHA1 structs.

Ensure this is initialized correctly based on system state
and key length.
Add fips_approved flag to SHA224 and HMAC-SHA224 structs.

Ensure this is initialized correctly based on system state
and key length.
Add fips_approved flag to SHA256 and HMAC-SHA256 structs.

Ensure this is initialized correctly based on system state
and key length.
Add fips_approved flag to SHA384 and HMAC-SHA384 structs.

Ensure this is initialized correctly based on system state
and key length.
Add fips_approved flag to SHA512 and HMAC-SHA512 structs.

Ensure this is initialized correctly based on system state
and key length.
Add fips_approved indicator to struct crypto_aes_ctx.

Requested by lab.
Add CONFIG_CRYPTO_FIPS_CUSTOM_VERSION=y, CONFIG_CRYPTO_FIPS_VERSION="ciq.6.18.20260531"

Requested by lab. Will be changed for rpm builds.
Unset CRYPTO_JITTERENTROPY_MEMSIZE_2, set CRYPTO_JITTERENTROPY_MEMSIZE_128.

Requested by lab.
github actions: Add FIPS protected directory check for PRs

Adds a workflow that runs on PRs targeting ciq-*-next branches and
checks whether new upstream commits touch FIPS protected directories.
Posts a PR comment alerting reviewers if changes are found.
Restore CRYPTO_TFM_FIPS_COMPLIANCE flag as an indicator to differentiate between internal and external IV generation when AES-GCM
encryption is performed.

Required by lab.
[CIQ] v6.18.35 - updated spec

[CIQ] ciq_kernel-6.18.35-2 - updated spec

github-actions: extend trigger glob to match suffix branches

Catches *_ciq-6.18.y-no-ltp, *_ciq-6.18.y-pr-only, and other branch-name
suffix variants used by the kernelCI skip-stages feature.
crypto: Kconfig - Make CRYPTO_FIPS depend on the DRBG being built-in

When FIPS mode is enabled (via fips=1), there is an absolute need for the
DRBG to be available. This is at odds with the fact that the DRBG can be
built as a module when in FIPS mode, leaving critical RNG functionality at
the whims of userspace.
random: Restrict extrng registration to init time

It is technically a risk to permit extrng registration by modules after
kernel init completes. Since there is only one user of the extrng interface
and it is imperative that it is the _only_ registered extrng for FIPS
compliance, restrict the extrng registration interface to only permit
registration during kernel init and only from built-in drivers.
crypto: rng - Only allow the DRBG to register as "stdrng" in FIPS mode

In FIPS mode, the DRBG must take precedence over all stdrng algorithms.
The only problem standing in the way of this is that a different stdrng
algorithm could get registered and utilized before the DRBG is registered,
and since crypto_alloc_rng() only allocates an stdrng algorithm when
there's no existing allocation, this means that it's possible for the wrong
stdrng algorithm to remain in use indefinitely.
crypto: rng - Fix tabs vs spaces in the per-CPU DRBG code

The 6.18.y version of "crypto: rng - Implement fast per-CPU DRBG instances"
picked up a few spots that use spaces where the ciqlts9_6 tree's version
[1] uses tabs: the lock_default_rng() comment's numbered list, the line
continuations in the unlock_local_rng() macro, and a brace in
crypto_devrandom_read_iter(). A nearby block comment was also missing the
space before its '*'. Fix them up.
crypto: rng - Make the per-CPU DRBG instances permanent

The per-CPU DRBG instances used to be torn down by crypto_del_default_rng()
under del_pcpu_rwsem, and the read path took that rwsem as a reader to keep
an instance from being freed out from under it. That machinery only made
sense back when the extrng override could be unregistered and the DRBG
could be built as a module.
crypto: rng - Skip leading zero-length iovec segments

The fast per-CPU DRBG path computes its initial user destination address
straight from the iov_iter. For an ITER_IOVEC iter it reads iter_iov_addr()
and iter_iov_len() of the current segment, but when the iovec leads with
one or more zero-length segments, the current segment is one of those empty
entries. iter_iov_addr() then hands back the base of an empty segment,
which is whatever userspace put there: its base can be NULL or some other
unwritable address, since a zero-length segment is never actually touched.
crypto: rng - Fix spurious EFAULT when the destination PTE is zapped

While GUP pinning makes it possible to pin the page _backing_ a user
address, it *doesn't* pin the page table entry (PTE) for that mapping. This
means the pinned physical page can be separated from the user address it
was backing, and even back a _different_ user address within the same
process. PTE zapping naturally happens during memory reclaim when memory
pressure is elevated, and can even be done directly by userspace via
madvise(MADV_DONTNEED).
Revert "mm/gup: reintroduce pin_user_pages_fast_only()"

This reverts commit ef467f3c43338f72f4173c98b15bc8021f79c3a1.
[CIQ] ciq_kernel-6.18.35-3 - updated spec

[CIQ] v6.18.36 - rebased configs

[CIQ] v6.18.36 - updated spec

[CIQ] v6.18.38 - updated spec

Add x86_64 minimal kernel variant to spec

Add a new "minimal" x86_64 kernel variant built with a stripped-down
config targeting server/cloud/VM workloads. Enabled by default on
x86_64, disableable with --without x86_64_minimal. A --with minimalonly
convenience option is also provided.
[CIQ] ciq_kernel-6.18.38-2 - updated spec

[CIQ] v6.18.39 - updated spec

[CIQ] v6.18.40 - rebased configs

[CIQ] v6.18.40 - updated spec

Test Results

✅ Build Stage

Architecture Build Time Total Time
x86_64 27m 41s 28m 16s
aarch64 23m 14s 23m 48s

✅ Boot Verification

✅ Kernel Selftests

Architecture Passed Failed Compared Against Status
x86_64 443 67 ciq-6.18.y-next ✅ No regressions
aarch64 375 59 ciq-6.18.y-next ✅ No regressions

✅ LTP Results

Architecture Passed Failed Compared Against Status
x86_64 1479 81 ciq-6.18.y-next ✅ No regressions
aarch64 1452 82 ciq-6.18.y-next ✅ No regressions

🤖 This PR was automatically generated by GitHub Actions
Run ID: 30120064959

bmastbergen and others added 30 commits July 24, 2026 13:12
Adding configs based of Fedora-ARK default config from 6.18.2.
We are modifying these with the following configs where available
CONFIG_MODIFY_LDT_SYSCALL=n
CONFIG_LEGACY_VSYSCALL_NONE=n
These options are for old software support which adds performance
overhead and potential attack surfaces with go against the CIQ LT
kernels priority of performance and security.

CONFIG_LIVEPATCH=n
We do not have Live patching on for any road-map

CONFIG_WQ_POWER_EFFICIENT_DEFAULT=y
This should be enabled, it often improves performance funnily enough

CONFIG_PREEMPT_VOLUNTARY=y
CONFIG_HZ=100
These are set to increase throughput CONFIG_PREEMPT_VOLUNTARY=y
(default
Fedora config) but CONFIG_HZ=100 for higher throughput over the
x86_64
default of CONFIG_HZ=1000 which provides lower latency.

After modification 'make CROSS_COMPILE=./scripts/dummy-tools/' was
run
Setting up the default build configs to ensure everything builds when we
update and rebase.
jira LE-2629
feature Additional SecureBoot patches for dynamic lockdown
commit b24fbd012b781b752cc51d6ef1fe1c6d5875ae87
commit-source https://salsa.debian.org/kernel-team/linux.git
commit-patch-path debian/patches/features/all/lockdown
commit-info Checkout the commit sha above and move to the directory
            listed above to find Debian patches matching this commits
	    summary line.

Add a kernel configuration option to lock down the kernel, to restrict
userspace's ability to modify the running kernel when UEFI Secure Boot is
enabled. Based on the x86 patch by Matthew Garrett.

Determine the state of Secure Boot in the EFI stub and pass this to the
kernel using the FDT.

Signed-off-by: Linn Crosetto <linn@hpe.com>
[bwh: Forward-ported to 4.10: adjust context]
[Lukas Wunner: Forward-ported to 4.11: drop parts applied upstream]
[bwh: Forward-ported to 4.15 and lockdown patch set:
 - Pass result of efi_get_secureboot() in stub through to
   efi_set_secure_boot() in main kernel
 - Use lockdown API and naming]
[bwh: Forward-ported to 4.19.3: adjust context in update_fdt()]
[dannf: Moved init_lockdown() call after uefi_init(), fixing SB detection]
[bwh: Drop call to init_lockdown(), as efi_set_secure_boot() now calls this]
[bwh: Forward-ported to 5.6: efi_get_secureboot() no longer takes a
 sys_table parameter]
[bwh: Forward-ported to 5.7: EFI initialisation from FDT was rewritten, so:
 - Add Secure Boot mode to the parameter enumeration in fdtparams.c
 - Add a parameter to efi_get_fdt_params() to return the Secure Boot mode
 - Since Xen does not have a property name defined for Secure Boot mode,
   change efi_get_fdt_prop() to handle a missing property name by clearing
   the output variable]
[Salvatore Bonaccorso: Forward-ported to 5.10: f30f242 ("efi: Rename
arm-init to efi-init common for all arch") renamed arm-init.c to efi-init.c]

Signed-off-by: Jonathan Maple <jmaple@ciq.com>
jira LE-2629
feature Additional SecureBoot patches for dynamic lockdown
commit b24fbd012b781b752cc51d6ef1fe1c6d5875ae87
commit-source https://salsa.debian.org/kernel-team/linux.git
commit-patch-path debian/patches/features/all/lockdown
commit-info Checkout the commit sha above and move to the directory
            listed above to find Debian patches matching this commits
            summary line.
UEFI machines can be booted in Secure Boot mode.  Add an EFI_SECURE_BOOT
flag that can be passed to efi_enabled() to find out whether secure boot is
enabled.

Move the switch-statement in x86's setup_arch() that inteprets the
secure_boot boot parameter to generic code and set the bit there.

Suggested-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
cc: linux-efi@vger.kernel.org
[rperier: Forward-ported to 5.5:
 - Use pr_warn()
 - Adjust context]
[bwh: Forward-ported to 5.6: adjust context]
[bwh: Forward-ported to 5.7:
 - Use the next available bit in efi.flags
 - Adjust context]
Signed-off-by: Jonathan Maple <jmaple@ciq.com>

Revert "efi: Add an EFI_SECURE_BOOT flag to indicate secure boot mode"

This reverts commit 4047f887e98539d07d664eaa6699d9c8fb6c0ca4.
jira LE-2629
feature Additional SecureBoot patches for dynamic lockdown
commit b24fbd012b781b752cc51d6ef1fe1c6d5875ae87
commit-source https://salsa.debian.org/kernel-team/linux.git
commit-patch-path debian/patches/features/all/lockdown
commit-info Checkout the commit sha above and move to the directory
            listed above to find Debian patches matching this commits
            summary line.

Based on an earlier patch by David Howells, who wrote the following
description:

> UEFI Secure Boot provides a mechanism for ensuring that the firmware will
> only load signed bootloaders and kernels.  Certain use cases may also
> require that all kernel modules also be signed.  Add a configuration option
> that to lock down the kernel - which includes requiring validly signed
> modules - if the kernel is secure-booted.

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
[Salvatore Bonaccorso: After fixing https://bugs.debian.org/956197 the
help text for LOCK_DOWN_IN_EFI_SECURE_BOOT was adjusted to mention that
lockdown is triggered in integrity mode (https://bugs.debian.org/1025417)]
Signed-off-by: Salvatore Bonaccorso <carnil@debian.org>
Signed-off-by: Jonathan Maple <jmaple@ciq.com>
jira LE-2629
feature Additional SecureBoot patches for dynamic lockdown
commit b24fbd012b781b752cc51d6ef1fe1c6d5875ae87
commit-source https://salsa.debian.org/kernel-team/linux.git
commit-patch-path debian/patches/features/all/lockdown
commit-info Checkout the commit sha above and move to the directory
            listed above to find Debian patches matching this commits
            summary line.

These drivers allow mapping arbitrary memory ranges as MTD devices.
This should be disabled to preserve the kernel's integrity when it is
locked down.

* Add the HWPARAM flag to the module parameters
* When slram is built-in, it uses __setup() to read kernel parameters,
  so add an explicit check security_locked_down() check

Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Cc: Matthew Garrett <mjg59@google.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Joern Engel <joern@lazybastard.org>
Cc: linux-mtd@lists.infradead.org
Signed-off-by: Jonathan Maple <jmaple@ciq.com>
jira LE-2629
feature Fedora EFI status status
commit 7a60169d168d6aae70aca10b7b71070666068529
commit-source https://gitlab.com/cki-project/kernel-ark/

This adds efi_status_to_str() for use when printing efi_status_t
messages, and reworks efi_status_to_err() so that the two use a common
list of errors.

Upstream Status: RHEL only
Signed-off-by: Peter Jones <pjones@redhat.com>
Signed-off-by: Jonathan Maple <jmaple@ciq.com>
CONFIG_SPI_MICROCHIP_CORE is no longer a valid config option in 6.18.3
 spi: microchip: rename driver file and internal identifiers
 Upstream 71c814e
Upstream commit 5ba2f0a (mm: introduce deferred freeing for
kernel page tables) was backported which adds new config option
ASYNC_KERNEL_PGTABLE_FREE.  Then upsteam commit e37d5a2
(iommu/sva: invalidate stale IOTLB entries for kernel address space)
was backported which selects it by default for x86 configs that have
selected IOMMU_SVA (which our x86_64 configs have)
 iommu/sva: invalidate stale IOTLB entries for kernel address space
 Upstream e37d5a2
The config dependency on DEVICE_PRIVATE for DRM_GPUSVM was removed,
causing it to be selected by default for configs with DRM_XE (like ours).
Because DRM_GPUSVM is now enabled, DRM_XE_USERPTR_INVAL_INJECT is valid,
but not selected by default.
 drm, drm/xe: Fix xe userptr in the absence of CONFIG_DEVICE_PRIVATE
 Upstream: bdcdf96 upstream.
ATH9K_AHB now depends on OF to be selected by default.  x86_64
configs do not have OF.  This is fine since ahb bus is arm only.
 wifi: ath9k: add OF dependency to AHB
 upstream: 125e7b3
WARN_ALL_UNSEEDED_RANDOM was removed completely
 Remove WARN_ALL_UNSEEDED_RANDOM kernel config option
 Upstream: 7dff99b

UNWIND_USER and HAVE_UNWIND_USER_FP were added and enabled
by default for x86.
 unwind_user/x86: Enable frame pointer unwinding on x86
 Upstream: 49cf34c
There are customers that will need this enabled by default
This matches the 6.12 spec
We are defining the product as clk so if we ever need to revoke or
deny the cert we can target this specific product
by design, kernel-ark blacklists all modules in modules-extra that have
a module alias. Now that qdiscs have their module alias [1], some of them
became blacklisted even if we didn't really intend to: move them back to
kernel-modules to preserve feature parity with other qdiscs (and
previous
releases).

[1] https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next.git/commit/?id=241a94abcf465ba9363d93168da5ddd47002930f
And define pkgrelease using buildid.

.1.1.0.0 is excessive
This comes from kernel-ark and is part of their solution for a
kernel variant that should supplant the factory kernel.  Since thats
not what we want, remove this to avoid any confusion.
Adds Provides and Conflicts tags to kernel-clk6.18-* packages that
cannot be parallel installed with stock Rocky kernel packages:
- kernel-doc
- kernel-headers
- kernel-cross-headers
- kernel-debuginfo-common
- kernel-tools
- kernel-tools-libs
- kernel-tools-libs-devel
- kernel-selftests-internal

This allows these packages to satisfy dependencies for stock kernel
packages while preventing simultaneous installation.
Introduce %{pkg_suffix} macro (clk%{patchversion}) and use it for:
- package_name: kernel-%{pkg_suffix}
- tool packages: perf, python3-perf, libperf, rtla, rv

Tool packages now named:
- perf-%{pkg_suffix}
- python3-perf-%{pkg_suffix}
- libperf-%{pkg_suffix}
- libperf-%{pkg_suffix}-devel
- rtla-%{pkg_suffix}
- rv-%{pkg_suffix}
- *-debuginfo variants

Each tool package includes:
- Provides: <original-name> = %{specrpmversion}-%{release}
- Conflicts: <original-name>

This prevents parallel installation with stock Rocky kernel tools
while satisfying dependencies for the original package names.
Switch Module.symvers compression from the dynamic %compression
macro (xz) to hardcoded gzip -c9, matching the upstream kernel spec.
Also fixes the ghost file permissions from 0644 to 0600.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Jonathan Dieter <jdieter@ciq.com>
Inject +%{pkg_suffix} into KVERREL and the shell-level equivalents
(KernelVer, DevelDir, EXTRAVERSION) so that uname -r shows the CLK
kernel identity, e.g. 6.18.19-1.1.el9_ciq.x86_64+clk6.18.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Jonathan Dieter <jdieter@ciq.com>
…g boot default

Reduce duplicated version numbers in the spec to single sources of truth:
- kernel_major_minor, kernel_patch, and buildid are the base defines
- specversion, kversion, patchlevel, pkgrelease, specrelease, and
  tarfile_release are all derived from them
- Remove specrpmversion (identical to specversion)
- Add el_version for tarball naming

Export GRUB_NON_STANDARD_KERNEL=true in the posttrans before calling
kernel-install so that 20-grub.install respects DEFAULTKERNEL in
/etc/sysconfig/kernel. When DEFAULTKERNEL=kernel-core, the CLK kernel
will no longer take over as the boot default on upgrade.

Update generate_tarball.sh to extract the base defines and compute
derived values rather than reading the now-derived tarfile_release
directly.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Signed-off-by: Jonathan Dieter <jdieter@ciq.com>
jallisonciq and others added 26 commits July 24, 2026 15:12
Ensure this is initialized correctly based on system state
and key length.

Requested by lab.

Signed-off-by: Jeremy Allison <jallison@ciq.com>
Requested by lab.

Signed-off-by: Jeremy Allison <jallison@ciq.com>
…ciq.6.18.20260531"

Requested by lab. Will be changed for rpm builds.

Signed-off-by: Jeremy Allison <jallison@ciq.com>
…E_128.

Requested by lab.

Signed-off-by: Jeremy Allison <jallison@ciq.com>
Adds a workflow that runs on PRs targeting ciq-*-next branches and
checks whether new upstream commits touch FIPS protected directories.
Posts a PR comment alerting reviewers if changes are found.

Uses check_fips_changes.py from kernel-src-tree-tools to perform the
check.
…ate between internal and external IV generation when AES-GCM

encryption is performed.

Required by lab.

Signed-off-by: Jeremy Allison <jallison@ciq.com>
Catches *_ciq-6.18.y-no-ltp, *_ciq-6.18.y-pr-only, and other branch-name
suffix variants used by the kernelCI skip-stages feature.
When FIPS mode is enabled (via fips=1), there is an absolute need for the
DRBG to be available. This is at odds with the fact that the DRBG can be
built as a module when in FIPS mode, leaving critical RNG functionality at
the whims of userspace.

Userspace could simply rmmod the DRBG module, or not provide it at all and
thus a different stdrng algorithm could be used without anyone noticing.

Additionally, when running a FIPS-enabled userspace, modprobe itself may
perform a getrandom() syscall _before_ loading a given module. As a result,
there's a possible deadlock scenario where the RNG core (crypto/rng.c)
initializes _before_ the DRBG, thereby installing its getrandom() override
without having an stdrng algorithm available. Then, when userspace calls
getrandom() which redirects to the override in crypto/rng.c,
crypto_alloc_rng("stdrng") invokes the UMH (modprobe) to load the DRBG
(which is aliased to stdrng). And *then* that modprobe invocation gets
stuck at getrandom() because there's no stdrng algorithm available!

There are too many risks that come with allowing the DRBG and RNG core to
be modular for FIPS mode. Therefore, make CRYPTO_FIPS require the DRBG to
be built-in, which in turn makes the DRBG require the RNG core to be
built-in. That way, it's guaranteed for these drivers to be built-in when
running in FIPS mode.

Also clean up the CRYPTO_FIPS option name and remove the CRYPTO_ANSI_CPRNG
dependency since it's obsolete for FIPS now.

Signed-off-by: Sultan Alsawaf <sultan@ciq.com>

Signed-off-by: Jonathan Maple <jmaple@ciq.com>
It is technically a risk to permit extrng registration by modules after
kernel init completes. Since there is only one user of the extrng interface
and it is imperative that it is the _only_ registered extrng for FIPS
compliance, restrict the extrng registration interface to only permit
registration during kernel init and only from built-in drivers.

This also eliminates the risks associated with the extrng interface itself
being designed to solely accommodate a single registration, which would
therefore permit the registered extrng to be overridden or even removed by
an unrelated module.

Signed-off-by: Sultan Alsawaf <sultan@ciq.com>
Signed-off-by: Jonathan Maple <jmaple@ciq.com>
In FIPS mode, the DRBG must take precedence over all stdrng algorithms.
The only problem standing in the way of this is that a different stdrng
algorithm could get registered and utilized before the DRBG is registered,
and since crypto_alloc_rng() only allocates an stdrng algorithm when
there's no existing allocation, this means that it's possible for the wrong
stdrng algorithm to remain in use indefinitely.

This issue is also often impossible to observe from userspace; an RNG other
than the DRBG could be used somewhere in the kernel and userspace would be
none the wiser.

To ensure this can never happen, only allow stdrng instances from the DRBG
to be registered when running in FIPS mode. This works since the previous
commit forces the DRBG to be built into the kernel when CONFIG_CRYPTO_FIPS
is enabled, so the DRBG's presence is guaranteed when fips_enabled is true.

Signed-off-by: Sultan Alsawaf <sultan@ciq.com>
Signed-off-by: Jonathan Maple <jmaple@ciq.com>
The 6.18.y version of "crypto: rng - Implement fast per-CPU DRBG instances"
picked up a few spots that use spaces where the ciqlts9_6 tree's version
[1] uses tabs: the lock_default_rng() comment's numbered list, the line
continuations in the unlock_local_rng() macro, and a brace in
crypto_devrandom_read_iter(). A nearby block comment was also missing the
space before its '*'. Fix them up.

[1] b0c560a

Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Sultan Alsawaf <sultan@ciq.com>
The per-CPU DRBG instances used to be torn down by crypto_del_default_rng()
under del_pcpu_rwsem, and the read path took that rwsem as a reader to keep
an instance from being freed out from under it. That machinery only made
sense back when the extrng override could be unregistered and the DRBG
could be built as a module.

That's no longer the case. extrng registration is now restricted to init
time from built-in drivers, and FIPS mode requires the DRBG to be built-in,
so the registered DRBG can't be unregistered or swapped out. As such, the
per-CPU instances are never torn down, and the deletion rwsem just adds a
lock to the hot read path for no reason.

Drop the deletion rwsem and crypto_del_pcpu_rng(), and stop freeing the
per-CPU instances in crypto_del_default_rng(). Since the instances are
permanent now, allocate their pages once at init time with __GFP_NOFAIL and
ditch free_pcpu_inst() along with the failure paths in crypto_rng_init();
failing to install the RNG override in FIPS mode would be catastrophic, so
the setup isn't allowed to fail anyway.

This brings the per-CPU DRBG implementation in line with the ciqlts9_6
tree's version of "crypto: rng - Implement fast per-CPU DRBG instances"
[1].

[1] b0c560a

Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Sultan Alsawaf <sultan@ciq.com>
The fast per-CPU DRBG path computes its initial user destination address
straight from the iov_iter. For an ITER_IOVEC iter it reads iter_iov_addr()
and iter_iov_len() of the current segment, but when the iovec leads with
one or more zero-length segments, the current segment is one of those empty
entries. iter_iov_addr() then hands back the base of an empty segment,
which is whatever userspace put there: its base can be NULL or some other
unwritable address, since a zero-length segment is never actually touched.

Right after the setup, that address is prefaulted, and on a bogus base it
fails. A failed prefault on the very first address is treated as fatal, so
the whole read bails out to -EFAULT even though there are perfectly good
non-empty segments later in the iovec. This is reachable with something as
simple as readv() on /dev/urandom where the first iovec entry is {NULL, 0}.

Fix it by advancing the iterator by zero before reading the first address.
The iovec advance loop walks past every leading empty segment and stops at
the first non-empty one, and there's guaranteed to be such a segment
because iov_iter_count() is nonzero at this point. Empty segments that crop
up mid-stream are already skipped by the per-copy advance, so this only
needs to run once during setup.

Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Sultan Alsawaf <sultan@ciq.com>
While GUP pinning makes it possible to pin the page _backing_ a user
address, it *doesn't* pin the page table entry (PTE) for that mapping. This
means the pinned physical page can be separated from the user address it
was backing, and even back a _different_ user address within the same
process. PTE zapping naturally happens during memory reclaim when memory
pressure is elevated, and can even be done directly by userspace via
madvise(MADV_DONTNEED).

Since the optimized per-CPU DRBG loop assumes copy_to_user_nofault() will
always succeed on a GUP-pinned page, it immediately bails out when the
nofault copy actually *does* fail for the reasons described above. This
results in either fewer than requested random bytes copied or, more
seriously, a spurious EFAULT returned to userspace when no random bytes
were copied.

As it turns out, there's no way to pin a PTE. That means it's not possible
to guarantee a 100% success rate for the copy_to_user_nofault() attempt.

Fix this by handling copy_to_user_nofault() errors correctly with a fall
back to a faultable copy attempt outside of the RNG lock. In order to
guarantee forward progress for the caller, an on-stack bounce buffer is
used to copy up to 256 bytes of the generated random bytes whenever this
happens rather than discarding the whole thing.

There's no need to use GUP pinning anymore since there's no use for having
a page pinned without pinning a PTE to go along with that page, hence the
page pinning is eliminated which saves a software page table walk that was
performed for _at least_ every destination page.

Reported-by: Kun Yi <kunyi@google.com>
Signed-off-by: Sultan Alsawaf <sultan@ciq.com>
This reverts commit ef467f3.

This helper is no longer used by the FIPS-mode RNG, which was the
motivation for reintroducing it. Remove it.

Signed-off-by: Sultan Alsawaf <sultan@ciq.com>
Add a new "minimal" x86_64 kernel variant built with a stripped-down
config targeting server/cloud/VM workloads. Enabled by default on
x86_64, disableable with --without x86_64_minimal. A --with minimalonly
convenience option is also provided.

The minimal config removes:
- Sound/ALSA, Wireless/WiFi, Bluetooth
- Multimedia/cameras (V4L2, UVC, IPU6)
- Laptop platform drivers (ThinkPad, Dell, ASUS, HP, etc.)
- Hibernate/suspend, ACPI sleep
- 32-bit (IA32) compatibility layer
- CAN bus, IIO sensors, parallel port, memory card readers
- Tablet/touchscreen input

And adds enhanced netfilter (NAT, MASQUERADE, security targets).
@ciq-kernel-automation ciq-kernel-automation Bot added the created-by-kernelci Tag PRs that were automatically created when a user branch was pushed to the repo (kernelCI) label Jul 24, 2026
@ciq-kernel-automation

Copy link
Copy Markdown
Author

⚠️ FIPS Protected Directory Changes Detected

New upstream commits in this rebase touch FIPS protected directories.
Please consult the CIQ FIPS / Security team before merging.

Details
[fips-check] Checking for FIPS protected changes in f89c296854b755a66657065c35b05406fc18264d..origin/ciq-6.18.y-next
[fips-check] Protected directories: arch/x86/crypto/, crypto/asymmetric_keys/, crypto/, drivers/crypto/, drivers/char/random.c, include/crypto
[fips-check] Checking for FIPS protected changes
[fips-check] Getting SHAS f89c296854b755a66657065c35b05406fc18264d..origin/ciq-6.18.y-next
[fips-check] Number of commits to check:  1618
[fips-check] Checking modifications of shas
[fips-check] Checked commit b'a4497a122e27f125ee650315d47942f9eaa5cb27' touched 1 FIPS protected files
  - b'drivers/crypto/'
[fips-check] Checked commit b'382fd8004cc6004842a6a9772f16b2750207c2a0' touched 1 FIPS protected files
  - b'drivers/crypto/'
[fips-check] Checked commit b'49cd5ac6de8de39a14ead609bb552d372d5602cd' touched 1 FIPS protected files
  - b'drivers/crypto/'
[fips-check] Checked commit b'83f29da85dc9d9a32fe62cd1055e8e6705e6bf80' touched 1 FIPS protected files
  - b'drivers/crypto/'
[fips-check] Checked 161 of 1618 commits
[fips-check] Checked 322 of 1618 commits
[fips-check] Checked 483 of 1618 commits
[fips-check] Checked 644 of 1618 commits
[fips-check] Checked 805 of 1618 commits
[fips-check] Checked 966 of 1618 commits
[fips-check] Checked commit b'2ba237315193604f41fb5109c06bf0fc61e2c4e4' touched 1 FIPS protected files
  - b'crypto/'
[fips-check] Checked commit b'fb4d57b83356d4bd411b45ede3024e0ff42c9b5e' touched 1 FIPS protected files
  - b'drivers/crypto/'
[fips-check] Checked commit b'5f99a396f706afc749448659d1565991330e4f71' touched 1 FIPS protected files
  - b'drivers/crypto/'
[fips-check] Checked 1127 of 1618 commits
[fips-check] Checked 1288 of 1618 commits
[fips-check] Checked commit b'4f3c17f14cf9085a9c9ae2145f748ea55cf6d4e9' touched 1 FIPS protected files
  - b'drivers/crypto/'
[fips-check] Checked commit b'5eac10c52139682a78a9442cb4ab1eb19eb07d69' touched 1 FIPS protected files
  - b'drivers/crypto/'
[fips-check] Checked commit b'5231093c082951f030f16769c280641411b17bd0' touched 1 FIPS protected files
  - b'drivers/crypto/'
[fips-check] Checked commit b'8572232ed74f54d1cc02477b0ad2a5cc1dc63dc7' touched 1 FIPS protected files
  - b'drivers/crypto/'
[fips-check] Checked commit b'376951c51cdd02334eab7e1c65e2da0c67522e71' touched 1 FIPS protected files
  - b'drivers/crypto/'
[fips-check] Checked 1449 of 1618 commits
[fips-check] Checked commit b'21650fe221ea9b72809140b691589dde8bff3eab' touched 1 FIPS protected files
  - b'drivers/crypto/'
[fips-check] Checked commit b'6acd2fbd00f9c72aebefce63fc2e73e8f3d79061' touched 2 FIPS protected files
  - b'crypto/'
  - b'crypto/asymmetric_keys/'
[fips-check] Checked commit b'9b21d5bd33a7f04a2f4dbc440150cc1d55a2c32b' touched 1 FIPS protected files
  - b'crypto/'
[fips-check] Checked commit b'aac63bbea8fd5a34f1a4305cb73369068f952d32' touched 1 FIPS protected files
  - b'drivers/crypto/'
[fips-check] Checked commit b'c5c79d92da0f9a09f48be5e2aabed2d6d1a96294' touched 1 FIPS protected files
  - b'drivers/crypto/'
[fips-check] Checked commit b'25b0061adc1c1dd53d4957daaac617bd191dbcfa' touched 1 FIPS protected files
  - b'drivers/crypto/'
[fips-check] Checked commit b'53baa6b90f499a7b1fb7a3787cf3e03d35dcb6c4' touched 1 FIPS protected files
  - b'drivers/crypto/'
[fips-check] Checked commit b'c401492e01c7bfd38cf14c94d85c7efafe7d1a25' touched 1 FIPS protected files
  - b'drivers/crypto/'
[fips-check] Checked commit b'd7860b682da55433b5da0591b0e4c1982ecd2689' touched 1 FIPS protected files
  - b'crypto/'
[fips-check] Checked 1610 of 1618 commits
[fips-check] 21 of 1618 commits have FIPS protected changes

[fips-check] ========================================
[fips-check] FIPS protected changes detected
[fips-check] ========================================
[fips-check] 21 commit(s) touch FIPS protected directories:

## Commit a4497a122e27f125ee650315d47942f9eaa5cb27
commit a4497a122e27f125ee650315d47942f9eaa5cb27
Author: Ahsan Atta <ahsan.atta@intel.com>
Date:   Mon Jul 20 14:08:35 2026 -0400

    crypto: qat - fix restarting state leak on allocation failure
    
    [ Upstream commit 7d3ed20f7e46b3e991936fedd7a28f3ff4aec8d2 ]
    
    In adf_dev_aer_schedule_reset(), ADF_STATUS_RESTARTING is set before
    allocating reset_data. If the allocation fails, the function returns
    -ENOMEM without queuing reset work, so nothing ever clears the bit.
    This leaves the device permanently stuck in the restarting state,
    causing all subsequent reset attempts to be silently skipped.
    
    Fix this by using test_and_set_bit() to atomically claim the
    RESTARTING state, preventing duplicate reset scheduling races under
    concurrent fatal error reporting. If the subsequent allocation fails,
    clear the bit to restore clean state so future reset attempts can
    proceed.
    
    Cc: stable@vger.kernel.org
    Fixes: d8cba25d2c68 ("crypto: qat - Intel(R) QAT driver framework")
    Signed-off-by: Ahsan Atta <ahsan.atta@intel.com>
    Co-developed-by: Maksim Lukoshkov <maksim.lukoshkov@intel.com>
    Signed-off-by: Maksim Lukoshkov <maksim.lukoshkov@intel.com>
    Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 drivers/crypto/intel/qat/qat_common/adf_aer.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

  FIPS directory: drivers/crypto/

## Commit 382fd8004cc6004842a6a9772f16b2750207c2a0
commit 382fd8004cc6004842a6a9772f16b2750207c2a0
Author: Thorsten Blum <thorsten.blum@linux.dev>
Date:   Mon Jul 20 09:30:39 2026 -0400

    crypto: atmel-sha204a - fail on hwrng registration error in probe path
    
    [ Upstream commit 49e05bb00f2e8168695f7af4d694c39e1423e8a2 ]
    
    Commit 13909a0c8897 ("crypto: atmel-sha204a - provide the otp content")
    overwrote the hwrng registration return value when creating the sysfs
    group, which allowed atmel_sha204a_probe() to succeed even if
    devm_hwrng_register() failed.
    
    Return immediately when devm_hwrng_register() fails, and report both
    hwrng and sysfs registration errors with dev_err(). Adjust the sysfs
    error log message for consistency.
    
    Fixes: 13909a0c8897 ("crypto: atmel-sha204a - provide the otp content")
    Cc: stable@vger.kernel.org
    Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 drivers/crypto/atmel-sha204a.c | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

  FIPS directory: drivers/crypto/

## Commit 49cd5ac6de8de39a14ead609bb552d372d5602cd
commit 49cd5ac6de8de39a14ead609bb552d372d5602cd
Author: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
Date:   Tue Jul 14 20:47:11 2026 -0400

    crypto: qat - fix VF2PF work teardown race in adf_disable_sriov()
    
    [ Upstream commit 277281c10c63791067d24d421f7c43a15faa9096 ]
    
    The VF2PF interrupt handler queues PF-side response work that stores a
    raw pointer to per-VF state (struct adf_accel_vf_info). Currently,
    adf_disable_sriov() destroys per-VF mutexes and frees vf_info without
    stopping new VF2PF work or waiting for in-flight workers to complete. A
    concurrently scheduled or already queued worker can then dereference
    freed memory.
    
    This manifests as a use-after-free when KASAN is enabled:
    
      BUG: KASAN: null-ptr-deref in mutex_lock+0x76/0xe0
      Write of size 8 at addr 0000000000000260 by task kworker/24:2/...
      Workqueue: qat_pf2vf_resp_wq adf_iov_send_resp [intel_qat]
      Call Trace:
        kasan_report+0x119/0x140
        mutex_lock+0x76/0xe0
        adf_gen4_pfvf_send+0xd4/0x1f0 [intel_qat]
        adf_recv_and_handle_vf2pf_msg+0x290/0x360 [intel_qat]
        adf_iov_send_resp+0x8c/0xe0 [intel_qat]
        process_one_work+0x6ac/0xfd0
        worker_thread+0x4dd/0xd30
        kthread+0x326/0x410
        ret_from_fork+0x33b/0x670
    
    Add a PF-local flag, vf2pf_disabled, that gates work queueing, worker
    processing, and interrupt re-enabling during teardown. Set this flag
    atomically with the hardware interrupt mask inside
    adf_disable_all_vf2pf_interrupts(). After masking, synchronize the AE
    cluster MSI-X interrupt and flush the PF response workqueue before
    tearing down per-VF locks and state so all in-flight work completes
    before vf_info is destroyed.
    
    Introduce adf_enable_all_vf2pf_interrupts() to clear the flag and
    unmask all VF2PF interrupts under the same lock when SR-IOV is
    re-enabled. This ensures the software flag and hardware state transition
    atomically on both the enable and disable paths.
    
    Cc: stable@vger.kernel.org
    Fixes: ed8ccaef52fa ("crypto: qat - Add support for SRIOV")
    Signed-off-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
    Reviewed-by: Ahsan Atta <ahsan.atta@intel.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Sasha Levin <sashal@kernel.org>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 .../intel/qat/qat_common/adf_accel_devices.h       |  2 ++
 .../crypto/intel/qat/qat_common/adf_common_drv.h   |  2 ++
 drivers/crypto/intel/qat/qat_common/adf_isr.c      | 39 ++++++++++++++++++++++
 drivers/crypto/intel/qat/qat_common/adf_sriov.c    | 20 +++++++++--
 4 files changed, 61 insertions(+), 2 deletions(-)

  FIPS directory: drivers/crypto/

## Commit 83f29da85dc9d9a32fe62cd1055e8e6705e6bf80
commit 83f29da85dc9d9a32fe62cd1055e8e6705e6bf80
Author: Eric Biggers <ebiggers@kernel.org>
Date:   Sun May 31 12:17:35 2026 -0700

    crypto: xilinx-trng - Remove crypto_rng interface
    
    commit 32b4d29280ed2a991dc196d5845b892acedc63b8 upstream.
    
    Implementing the crypto_rng interface has no purpose, as it isn't used
    in practice.  It's being removed from other drivers too.  Just remove
    it.  This leaves hwrng, which is actually used.
    
    Tagging with 'Cc stable' due to the bugs that this removes:
    
      - xtrng_trng_generate() sometimes returned success even when it didn't
        fill in all the bytes.
    
      - It was possible for xtrng_trng_generate() and
        xtrng_hwrng_trng_read() to run concurrently and interfere with each
        other, as the locking code in xtrng_hwrng_trng_read() was broken.
    
    Fixes: 8979744aca80 ("crypto: xilinx - Add TRNG driver for Versal")
    Cc: stable@vger.kernel.org
    Signed-off-by: Eric Biggers <ebiggers@kernel.org>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

 drivers/crypto/Kconfig              |  1 -
 drivers/crypto/xilinx/xilinx-trng.c | 75 +------------------------------------
 2 files changed, 1 insertion(+), 75 deletions(-)

  FIPS directory: drivers/crypto/

## Commit 2ba237315193604f41fb5109c06bf0fc61e2c4e4
commit 2ba237315193604f41fb5109c06bf0fc61e2c4e4
Author: Herbert Xu <herbert@gondor.apana.org.au>
Date:   Thu Jun 4 12:30:54 2026 +0800

    crypto: rng - Free default RNG on module exit
    
    [ Upstream commit 606ba888b98e0d26a2c4e5c8dc0542e3ad8f0f3a ]
    
    When the rng module is removed the default RNG will be leaked.
    Call crypto_del_default_rng to free it if possible.
    
    Fixes: 7cecadb7cca8 ("crypto: rng - Do not free default RNG when it becomes unused")
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 crypto/rng.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

  FIPS directory: crypto/

## Commit fb4d57b83356d4bd411b45ede3024e0ff42c9b5e
commit fb4d57b83356d4bd411b45ede3024e0ff42c9b5e
Author: Felix Gu <ustc.gu@gmail.com>
Date:   Tue Jun 2 22:55:35 2026 +0800

    crypto: cavium/cpt - fix DMA cleanup using wrong loop index
    
    [ Upstream commit 9dbf173bd32d5f81b005008b682bfb50aa093455 ]
    
    The sg_cleanup error path used list[i] instead of list[j] when unmapping
    DMA buffers, leaking successfully mapped entries and repeatedly unmapping
    the failed one.
    
    Fixes: c694b233295b ("crypto: cavium - Add the Virtual Function driver for CPT")
    Signed-off-by: Felix Gu <ustc.gu@gmail.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 drivers/crypto/cavium/cpt/cptvf_reqmanager.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

  FIPS directory: drivers/crypto/

## Commit 5f99a396f706afc749448659d1565991330e4f71
commit 5f99a396f706afc749448659d1565991330e4f71
Author: Felix Gu <ustc.gu@gmail.com>
Date:   Tue Jun 2 22:38:26 2026 +0800

    crypto: marvell/octeontx - fix DMA cleanup using wrong loop index
    
    [ Upstream commit 7891c64c0520519782470ba29bac8a5761e295d8 ]
    
    The sg_cleanup path used list[i] instead of list[j] when unmapping DMA
    buffers, leaking successfully mapped entries and repeatedly unmapping
    the failed one.
    
    Fixes: 10b4f09491bf ("crypto: marvell - add the Virtual Function driver for CPT")
    Signed-off-by: Felix Gu <ustc.gu@gmail.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 drivers/crypto/marvell/octeontx/otx_cptvf_reqmgr.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

  FIPS directory: drivers/crypto/

## Commit 4f3c17f14cf9085a9c9ae2145f748ea55cf6d4e9
commit 4f3c17f14cf9085a9c9ae2145f748ea55cf6d4e9
Author: Herbert Xu <herbert@gondor.apana.org.au>
Date:   Wed May 20 10:51:14 2026 +0800

    crypto: tegra - Return ENOMEM when input buffer allocation fails for ccm
    
    [ Upstream commit 690a5f9e5c972a580565ce544ed1627ccf1e84de ]
    
    Ensure the ENOMEM error value is set when the input buffer allocation
    fails in tegra_ccm_do_one_req.
    
    Fixes: 1e245948ca0c ("crypto: tegra - finalize crypto req on error")
    Reported-by: Vladislav Dronov <vdronov@redhat.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Reviewed-by: Vladislav Dronov <vdronov@redhat.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 drivers/crypto/tegra/tegra-se-aes.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

  FIPS directory: drivers/crypto/

## Commit 5eac10c52139682a78a9442cb4ab1eb19eb07d69
commit 5eac10c52139682a78a9442cb4ab1eb19eb07d69
Author: Herbert Xu <herbert@gondor.apana.org.au>
Date:   Tue May 19 12:22:18 2026 +0800

    crypto: tegra - Fix dma_free_coherent size error
    
    [ Upstream commit 03215b8457784540acc741e6331e355b62c6c8ab ]
    
    When freeing a coherent DMA buffer, the size must match the value
    that was used during the allocation.
    
    Unfortunately the size field in the tegra driver gets overwritten
    by this point so it no longer matches and creates a warning.
    
    Fix this by saving a copy of the size on the stack.
    
    Note that the ccm function actually mixes up the inbuf and outbuf
    sizes, but it doesn't matter because the two sizes are actually
    equal.
    
    Fixes: 1cb328da4e8f ("crypto: tegra - Do not use fixed size buffers")
    Reporeted-by: Patrick Talbert <ptalbert@redhat.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Reviewed-by: Vladislav Dronov <vdronov@redhat.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 drivers/crypto/tegra/tegra-se-aes.c | 28 ++++++++++++++++------------
 1 file changed, 16 insertions(+), 12 deletions(-)

  FIPS directory: drivers/crypto/

## Commit 5231093c082951f030f16769c280641411b17bd0
commit 5231093c082951f030f16769c280641411b17bd0
Author: Aleksander Jan Bajkowski <olek2@wp.pl>
Date:   Mon May 18 23:24:59 2026 +0200

    crypto: inside-secure/eip93 - Add check for devm_request_threaded_irq
    
    [ Upstream commit 85a61bf9145d4097c740ffcf3aa832d930a8913b ]
    
    As the potential failure of the devm_request_threaded_irq(),
    it should be better to check the return value and return
    error if fails.
    
    Fixes: 9739f5f93b78 ("crypto: eip93 - Add Inside Secure SafeXcel EIP-93 crypto engine support")
    Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 drivers/crypto/inside-secure/eip93/eip93-main.c | 2 ++
 1 file changed, 2 insertions(+)

  FIPS directory: drivers/crypto/

## Commit 8572232ed74f54d1cc02477b0ad2a5cc1dc63dc7
commit 8572232ed74f54d1cc02477b0ad2a5cc1dc63dc7
Author: Weili Qian <qianweili@huawei.com>
Date:   Mon May 18 22:29:54 2026 +0800

    crypto: hisilicon/qm - disable error report before flr
    
    [ Upstream commit e71dc5602b9a29027f6aedd5990d3e8c4f638c8c ]
    
    Before function level reset, driver first disable device error report
    and then waits for the device reset to complete. However, when the
    error is recovered, the error bits will be enabled again, resulting in
    invalid disable. It is modified to detect that there is no error
    before disable error report, and then do FLR.
    
    Fixes: 7ce396fa12a9 ("crypto: hisilicon - add FLR support")
    Signed-off-by: Weili Qian <qianweili@huawei.com>
    Signed-off-by: Zongyu Wu <wuzongyu1@huawei.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 drivers/crypto/hisilicon/qm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

  FIPS directory: drivers/crypto/

## Commit 376951c51cdd02334eab7e1c65e2da0c67522e71
commit 376951c51cdd02334eab7e1c65e2da0c67522e71
Author: Aleksander Jan Bajkowski <olek2@wp.pl>
Date:   Sat May 16 14:26:51 2026 +0200

    crypto: eip93 - fix reset ring register definition
    
    [ Upstream commit 09e6b79b8ce388993aec9ac91b1cb2c181c27bd9 ]
    
    This patch fixes a descriptor ring reset. This causes a hang in the
    driver's unload/load sequence.
    
    Fixes: 9739f5f93b78 ("crypto: eip93 - Add Inside Secure SafeXcel EIP-93 crypto engine support")
    Suggested-by: Benjamin Larsson <benjamin.larsson@genexis.eu>
    Signed-off-by: Aleksander Jan Bajkowski <olek2@wp.pl>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 drivers/crypto/inside-secure/eip93/eip93-regs.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

  FIPS directory: drivers/crypto/

## Commit 21650fe221ea9b72809140b691589dde8bff3eab
commit 21650fe221ea9b72809140b691589dde8bff3eab
Author: Sean Christopherson <seanjc@google.com>
Date:   Mon May 4 15:28:12 2026 -0700

    crypto: ccp - Treat zero-length cert chain as query for blob lengths
    
    [ Upstream commit ef8c9dacda2871accd64e3eda951fef6b788b1ea ]
    
    When handling a PDH export, treat a zero-length userspace cert chain buffer
    as a request to query the length of the relevant blobs.  Failure to account
    for the zero-length buffer trips a BUG_ON() when running with
    CONFIG_DEBUG_VIRTUAL=y due to trying to get the physical address of the
    ZERO_SIZE_PTR (returned by kzalloc() on the bogus allocation).
    
       kernel BUG at arch/x86/mm/physaddr.c:28 !
      Oops: invalid opcode: 0000 [#1] SMP KASAN NOPTI
      CPU: 30 UID: 0 PID: 28580 Comm: syz.2.18 Kdump: loaded
      Tainted: G        W           6.18.16-smp-DEV #1 NONE
      Tainted: [W]=WARN
      Hardware name: Google, Inc. Arcadia_IT_80/Arcadia_IT_80, BIOS 12.62.0-0 11/19/2025
       RIP: 0010:__phys_addr+0x16a/0x180 arch/x86/mm/physaddr.c:28
      RSP: 0018:ffffc9008329fc80 EFLAGS: 00010293
      RAX: ffffffff8179110a RBX: 0000778000000010 RCX: ffff8884e6992600
      RDX: 0000000000000000 RSI: 0000000080000010 RDI: 0000778000000010
      RBP: ffffc9008329fdf0 R08: 0000000000000dc0 R09: 00000000ffffffff
      R10: dffffc0000000000 R11: fffffbfff126d297 R12: dffffc0000000000
      R13: 1ffff92010653fc8 R14: 0000000080000010 R15: dffffc0000000000
      FS:  0000555556bec9c0(0000) GS:ffff88aa4ce1c000(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
      CR2: 00007fd3159e7000 CR3: 00000004fbc44000 CR4: 0000000000350ef0
      Call Trace:
       <TASK>
        [<ffffffff853d3869>] sev_ioctl_do_pdh_export+0x559/0x7a0 drivers/crypto/ccp/sev-dev.c:2308
        [<ffffffff853d1fdd>] sev_ioctl+0x2cd/0x480 drivers/crypto/ccp/sev-dev.c:2556
        [<ffffffff82549ebc>] vfs_ioctl fs/ioctl.c:52 [inline]
        [<ffffffff82549ebc>] __do_sys_ioctl fs/ioctl.c:598 [inline]
        [<ffffffff82549ebc>] __se_sys_ioctl+0xfc/0x170 fs/ioctl.c:584
        [<ffffffff8630115f>] do_syscall_x64 arch/x86/entry/syscall_64.c:64 [inline]
        [<ffffffff8630115f>] do_syscall_64+0x9f/0xf40 arch/x86/entry/syscall_64.c:98
       [<ffffffff81000136>] entry_SYSCALL_64_after_hwframe+0x76/0x7e
      RIP: 0033:0x7fd3158eac39
       </TASK>
    
    Thankfully, the bug is benign outside of CONFIG_DEBUG_VIRTUAL=y as getting
    the physical address is just arithmetic, and the PSP errors out before
    trying to write to the garbage address (which it must, otherwise querying
    the blob lengths would clobber memory at pfn=0).
    
    Fixes: 76a2b524a4b1 ("crypto: ccp: Implement SEV_PDH_CERT_EXPORT ioctl command")
    Signed-off-by: Sean Christopherson <seanjc@google.com>
    Reviewed-by: Tom Lendacky <thomas.lendacky@amd.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 drivers/crypto/ccp/sev-dev.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

  FIPS directory: drivers/crypto/

## Commit 6acd2fbd00f9c72aebefce63fc2e73e8f3d79061
commit 6acd2fbd00f9c72aebefce63fc2e73e8f3d79061
Author: Weiming Shi <bestswngs@gmail.com>
Date:   Thu Apr 30 10:36:34 2026 -0700

    crypto: asymmetric_keys - fix OOB read in pefile_digest_pe_contents
    
    [ Upstream commit f7dd32c5179d7755de18e21d5674b08f9e5cb180 ]
    
    pefile_digest_pe_contents() computes the trailing-data hash length as
    pelen - (hashed_bytes + certs_size). A crafted PE can make the addition
    exceed pelen, causing the unsigned subtraction to underflow to ~4 GiB.
    This is passed to crypto_shash_update() which reads out of bounds and
    panics on unmapped vmalloc guard pages.
    
     BUG: unable to handle page fault for address: ffffc900038d8000
     Oops: Oops: 0000 [#1] SMP KASAN NOPTI
     RIP: 0010:sha256_blocks_generic (lib/crypto/sha256.c:152)
     Call Trace:
      <TASK>
      __sha256_update (lib/crypto/sha256.c:208)
      crypto_sha256_update (crypto/sha256.c:142)
      verify_pefile_signature (crypto/asymmetric_keys/verify_pefile.c:436)
      kexec_kernel_verify_pe_sig (kernel/kexec_file.c:151)
      __do_sys_kexec_file_load (kernel/kexec_file.c:406)
      do_syscall_64 (arch/x86/entry/syscall_64.c:94)
      entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:121)
      </TASK>
     Kernel panic - not syncing: Fatal exception
    
    Validate that the addition does not overflow and the result does not
    exceed pelen before the subtraction. Return -ELIBBAD on failure.
    
    Fixes: af316fc442ef ("pefile: Digest the PE binary and compare to the PKCS#7 data")
    Reported-by: Xiang Mei <xmei5@asu.edu>
    Signed-off-by: Weiming Shi <bestswngs@gmail.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 crypto/asymmetric_keys/verify_pefile.c | 2 ++
 1 file changed, 2 insertions(+)

  FIPS directory: crypto/
  FIPS directory: crypto/asymmetric_keys/

## Commit 9b21d5bd33a7f04a2f4dbc440150cc1d55a2c32b
commit 9b21d5bd33a7f04a2f4dbc440150cc1d55a2c32b
Author: Thorsten Blum <thorsten.blum@linux.dev>
Date:   Sat May 2 21:09:04 2026 +0200

    crypto: ecrdsa - fix unknown OID check in ecrdsa_param_curve
    
    [ Upstream commit 2d7b2cfc59998baf5e8622a24dc28f69a5212e06 ]
    
    The ->curve_oid check in ecrdsa_param_curve() rejects the valid enum
    value 0 (OID_id_dsa_with_sha1), but look_up_OID() returns OID__NR on
    lookup failure. Compare ->curve_oid with OID__NR instead to ensure that
    only unknown OIDs return -EINVAL.
    
    Fixes: 0d7a78643f69 ("crypto: ecrdsa - add EC-RDSA (GOST 34.10) algorithm")
    Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
    Reviewed-by: Lukas Wunner <lukas@wunner.de>
    Reviewed-by: Vitaly Chikunov <vt@altlinux.org>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 crypto/ecrdsa.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

  FIPS directory: crypto/

## Commit aac63bbea8fd5a34f1a4305cb73369068f952d32
commit aac63bbea8fd5a34f1a4305cb73369068f952d32
Author: Lothar Rubusch <l.rubusch@gmail.com>
Date:   Sun Apr 26 21:29:47 2026 +0000

    crypto: atmel-sha204a - fix blocking and non-blocking rng logic
    
    [ Upstream commit 319400fc5ee15db5793aa45f854968141326effc ]
    
    The blocking and non-blocking paths were failing to provide valid entropy
    due to improper buffer management. Reading the buffer starting from byte 1,
    only fetch the 32 bytes of random data from the return message.
    
    Tested on an Atmel SHA204A device.
    
    Before (here for blocking), tests showed repeatedly reading reduced bytes.
    $ head -c 32 /dev/hwrng | hexdump -C
    00000000  02 28 85 b3 47 40 f2 ee  00 00 00 00 00 00 00 00  |.(..G@..........|
    00000010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
    00000020
    
    After, the result will be similar to the following:
    $ head -c 32 /dev/hwrng | hexdump -C
    00000000  5a fc 3f 13 14 68 fe 06  68 0a bd 04 83 6e 09 69  |Z.?..h..h....n.i|
    00000010  75 ff cf 87 10 84 3b c9  c1 df ae eb 45 53 4c c3  |u.....;.....ESL.|
    00000020
    
    Fixes: da001fb651b0 ("crypto: atmel-i2c - add support for SHA204A random number generator")
    Suggested-by: Ard Biesheuvel <ardb@kernel.org>
    Signed-off-by: Lothar Rubusch <l.rubusch@gmail.com>
    Tested-by: Thorsten Blum <thorsten.blum@linux.dev>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 drivers/crypto/atmel-sha204a.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

  FIPS directory: drivers/crypto/

## Commit c5c79d92da0f9a09f48be5e2aabed2d6d1a96294
commit c5c79d92da0f9a09f48be5e2aabed2d6d1a96294
Author: Tycho Andersen (AMD) <tycho@kernel.org>
Date:   Wed Apr 8 08:32:57 2026 -0600

    crypto: ccp - Fix snp_filter_reserved_mem_regions() off-by-one
    
    [ Upstream commit 1b864b6cb213bbd7b406e9b2e98c962077f300df ]
    
    Sashiko notes:
    
    > regarding the bounds check in snp_filter_reserved_mem_regions()
    > called via walk_iomem_res_desc(): does the check
    > if ((range_list->num_elements * 16 + 8) > PAGE_SIZE)
    > allow an off-by-one heap buffer overflow?
    >
    > If range_list->num_elements is 255, 255 * 16 + 8 = 4088, which is <= 4096.
    > Writing range->base (8 bytes) fills 4088-4095, but writing range->page_count
    > (4 bytes) would write to 4096-4099, overflowing the kzalloc-allocated
    > PAGE_SIZE buffer.
    
    Fix this by accounting for the entry about to be written to, in addition to
    the entries that are already allocated.
    
    Fixes: 1ca5614b84ee ("crypto: ccp: Add support to initialize the AMD-SP for SEV-SNP")
    Reported-by: Sashiko
    Assisted-by: Gemini:gemini-3.1-pro-preview
    Link: https://sashiko.dev/#/patchset/20260324161301.1353976-1-tycho%40kernel.org
    Signed-off-by: Tycho Andersen (AMD) <tycho@kernel.org>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 drivers/crypto/ccp/sev-dev.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

  FIPS directory: drivers/crypto/

## Commit 25b0061adc1c1dd53d4957daaac617bd191dbcfa
commit 25b0061adc1c1dd53d4957daaac617bd191dbcfa
Author: Tycho Andersen (AMD) <tycho@kernel.org>
Date:   Wed Apr 8 08:32:56 2026 -0600

    crypto: ccp - Reverse the cleanup order in psp_dev_destroy()
    
    [ Upstream commit 4a76a164ba1617f60d1c8a2fd754466c9d9e48e9 ]
    
    Before SNP x86 shutdown [1], all HV_FIXED pages were always leaked on
    module unload. Now pages can be reclaimed if they are freed before SNP
    shutdown.
    
    The SFS driver does sfs_dev_destroy() -> snp_free_hv_fixed_pages(), marking
    the command buffer as free. But this happens after sev_dev_destroy() in
    psp_dev_destroy(), so the pages are always leaked.
    
    Rearrange psp_dev_destroy() to destroy things in the reverse order from
    psp_init(), so that any dependencies can be unwound accordingly. This lets
    SFS free the page and the subsequent SNP shutdown release it.
    
    This was identified with use of Chris Mason's review-prompts:
    https://github.com/masoncl/review-prompts
    
    [1]: https://lore.kernel.org/all/20260324161301.1353976-1-tycho@kernel.org/
    
    Fixes: 648dbccc03a0 ("crypto: ccp - Add AMD Seamless Firmware Servicing (SFS) driver")
    Reported-by: review-prompts
    Assisted-by: Claude:claude-4.6-opus
    Suggested-by: Tom Lendacky <thomas.lendacky@amd.com>
    Signed-off-by: Tycho Andersen (AMD) <tycho@kernel.org>
    Reviewed-by: Ashish Kalra <ashish.kalra@amd.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 drivers/crypto/ccp/psp-dev.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

  FIPS directory: drivers/crypto/

## Commit 53baa6b90f499a7b1fb7a3787cf3e03d35dcb6c4
commit 53baa6b90f499a7b1fb7a3787cf3e03d35dcb6c4
Author: Damian Muszynski <damian.muszynski@intel.com>
Date:   Tue Apr 7 12:04:26 2026 +0200

    crypto: qat - fix heartbeat error injection
    
    [ Upstream commit 2e96024632b386c86860aa78639940fc96d6fcc9 ]
    
    The current implementation of the heartbeat error injection uses
    adf_disable_arb_thd() to stop a specific accelerator engine thread
    from processing requests. This does not reliably prevent the device
    from generating responses.
    
    Fix the error injection by disabling the device arbiter through
    exit_arb() instead. This properly simulates a device failure by
    stopping all arbitration, which results in missing responses for
    sent requests.
    
    Remove the now unused adf_disable_arb_thd() function and its
    declaration.
    
    Fixes: e2b67859ab6e ("crypto: qat - add heartbeat error simulator")
    Signed-off-by: Damian Muszynski <damian.muszynski@intel.com>
    Reviewed-by: Ahsan Atta <ahsan.atta@intel.com>
    Reviewed-by: Giovanni Cabiddu <giovanni.cabiddu@intel.com>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 .../crypto/intel/qat/qat_common/adf_common_drv.h   |  1 -
 .../intel/qat/qat_common/adf_heartbeat_inject.c    |  6 ++----
 .../crypto/intel/qat/qat_common/adf_hw_arbiter.c   | 25 ----------------------
 3 files changed, 2 insertions(+), 30 deletions(-)

  FIPS directory: drivers/crypto/

## Commit c401492e01c7bfd38cf14c94d85c7efafe7d1a25
commit c401492e01c7bfd38cf14c94d85c7efafe7d1a25
Author: Eric Biggers <ebiggers@kernel.org>
Date:   Thu Jul 16 20:50:58 2026 -0700

    crypto: sun4i-ss - Remove insecure and unused rng_alg
    
    commit b2c41fa9dd8fc740c489e060b199165771f268d1 upstream.
    
    Remove sun4i_ss_rng, as it is insecure and unused:
    
    - It has multiple vulnerabilities.  sun4i_ss_prng_seed() is missing
      locking and has a buffer overflow.  sun4i_ss_prng_generate() fails to
      fill the entire buffer with cryptographic random bytes, because it
      rounds the destination length down and also doesn't actually wait for
      the hardware to be ready before pulling bytes from it.
    
    - No user of this code is known.  It's usable only theoretically via the
      "rng" algorithm type of AF_ALG.  But userspace actually just uses the
      actual Linux RNG (/dev/random etc) instead.  And rng_algs don't
      contribute entropy to the actual Linux RNG either.  (This may have
      been confused with hwrng, which does contribute entropy.)
    
    The sun4i_ss_prng_seed() buffer overflow was reported by Tianchu Chen
    and discovered by Atuin - Automated Vulnerability Discovery Engine
    
    There's no point in fixing all these vulnerabilities individually when
    this is unused code, so let's just remove it.
    
    Fixes: b8ae5c7387ad ("crypto: sun4i-ss - support the Security System PRNG")
    Cc: stable@vger.kernel.org
    Reported-by: Tianchu Chen <flynnnchen@tencent.com>
    Closes: https://lore.kernel.org/r/af749a8447bd7f0e9dd26ca6c87e9c6afecb09d9@linux.dev/
    Acked-by: Corentin LABBE <clabbe.montjoie@gmail.com>
    Signed-off-by: Eric Biggers <ebiggers@kernel.org>
    Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 arch/arm/configs/sunxi_defconfig                  |  1 -
 drivers/crypto/allwinner/Kconfig                  |  8 ---
 drivers/crypto/allwinner/sun4i-ss/Makefile        |  1 -
 drivers/crypto/allwinner/sun4i-ss/sun4i-ss-core.c | 36 ------------
 drivers/crypto/allwinner/sun4i-ss/sun4i-ss-prng.c | 69 -----------------------
 drivers/crypto/allwinner/sun4i-ss/sun4i-ss.h      | 20 -------
 6 files changed, 135 deletions(-)

  FIPS directory: drivers/crypto/

## Commit d7860b682da55433b5da0591b0e4c1982ecd2689
commit d7860b682da55433b5da0591b0e4c1982ecd2689
Author: Muhammet Kaan KILINÇ <muhammetkaankilinc@gmail.com>
Date:   Thu Jul 16 02:58:36 2026 +0000

    crypto: algif_skcipher - force synchronous processing
    
    The AIO/async path in skcipher_recvmsg() passes the socket-wide ctx->iv
    directly into the skcipher request. After io_submit() the socket lock is
    dropped and the request is processed asynchronously by a worker (e.g.
    cryptd), which dereferences ctx->iv only later.
    
    A concurrent sendmsg(ALG_SET_IV) on the same socket can overwrite ctx->iv
    inside this window, so the in-flight request runs under an
    attacker-controlled IV. For CTR and other stream modes this causes
    IV/keystream reuse and allows an unprivileged user to recover the
    plaintext of a concurrent operation.
    
    Snapshotting ctx->iv into per-request storage for the async path is not
    sufficient here. For ciphers with statesize == 0 - which includes cbc
    and ctr - skcipher_prepare_alg() installs skcipher_noimport()/
    skcipher_noexport(), so ctx->state carries nothing and the MSG_MORE
    inter-chunk IV chaining is carried solely by the in-place req->iv
    writeback. A snapshot redirects that writeback into per-request memory
    that af_alg_free_resources() releases on completion, so AIO + MSG_MORE
    with cbc/ctr would silently produce wrong output. Writing the IV back
    from the completion callback instead is not possible either: that would
    require lock_sock() there, but the callback can run in softirq/atomic
    context, so it must not sleep.
    
    Make the operation synchronous instead. ctx->iv is then only ever
    dereferenced under the socket lock held by recvmsg(), which removes the
    race, and the req->iv writeback lands in ctx->iv as before, which keeps
    MSG_MORE chaining intact for statesize == 0 ciphers. The ctx->state
    import/export path is unchanged for ciphers that do have state.
    
    This is equivalent to the upstream resolution: commit fcc77d33a34c
    ("net: Remove support for AIO on sockets") removed the AIO socket path
    across net/ entirely, producing the same end state for this file -
    algif_skcipher never processes an AIO request asynchronously. After this
    patch, _skcipher_recvmsg() matches mainline's crypto/algif_skcipher.c as
    it stands today, including the same now-dead -EIOCBQUEUED check. This
    patch deviates from that commit deliberately: rather than removing AIO
    socket support tree-wide, which would be far too invasive for stable, it
    removes only the AIO branch in crypto/algif_skcipher.c. io_submit() now
    completes synchronously, which is valid for the AIO interface; AF_ALG
    async is rarely used in practice.
    
    The -EIOCBQUEUED check in skcipher_recvmsg() is now dead but harmless,
    and is left alone to keep the fix minimal.
    
    Fixes: e870456d8e7c ("crypto: algif_skcipher - overhaul memory management")
    Cc: <stable@vger.kernel.org>
    Reported-by: Muhammet Kaan KILINÇ <muhammetkaankilinc@gmail.com>
    Signed-off-by: Muhammet Kaan KILINÇ <muhammetkaankilinc@gmail.com>
    Signed-off-by: Sasha Levin <sashal@kernel.org>

 crypto/algif_skcipher.c | 75 ++++++++++++++++---------------------------------
 1 file changed, 24 insertions(+), 51 deletions(-)

  FIPS directory: crypto/

[fips-check] --fips-override set, continuing despite FIPS protected changes

@bmastbergen bmastbergen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥌

@bmastbergen
bmastbergen requested a review from a team July 25, 2026 01:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

created-by-kernelci Tag PRs that were automatically created when a user branch was pushed to the repo (kernelCI)

Development

Successfully merging this pull request may close these issues.