<?xml version="1.0" encoding="UTF-8"?>
<cvrfdoc xmlns="http://www.icasi.org/CVRF/schema/cvrf/1.1" xmlns:cvrf="http://www.icasi.org/CVRF/schema/cvrf/1.1">
	<DocumentTitle xml:lang="en">An update for kernel is now available for openEuler-24.03-LTS-SP1</DocumentTitle>
	<DocumentType>Security Advisory</DocumentType>
	<DocumentPublisher Type="Vendor">
		<ContactDetails>openeuler-security@openeuler.org</ContactDetails>
		<IssuingAuthority>openEuler security committee</IssuingAuthority>
	</DocumentPublisher>
	<DocumentTracking>
		<Identification>
			<ID>openEuler-SA-2025-2410</ID>
		</Identification>
		<Status>Final</Status>
		<Version>1.0</Version>
		<RevisionHistory>
			<Revision>
				<Number>1.0</Number>
				<Date>2025-10-11</Date>
				<Description>Initial</Description>
			</Revision>
		</RevisionHistory>
		<InitialReleaseDate>2025-10-11</InitialReleaseDate>
		<CurrentReleaseDate>2025-10-11</CurrentReleaseDate>
		<Generator>
			<Engine>openEuler SA Tool V1.0</Engine>
			<Date>2025-10-11</Date>
		</Generator>
	</DocumentTracking>
	<DocumentNotes>
		<Note Title="Synopsis" Type="General" Ordinal="1" xml:lang="en">kernel security update</Note>
		<Note Title="Summary" Type="General" Ordinal="2" xml:lang="en">An update for kernel is now available for openEuler-24.03-LTS-SP1</Note>
		<Note Title="Description" Type="General" Ordinal="3" xml:lang="en">The Linux Kernel, the operating system core itself.

Security Fix(es):

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

pinctrl: mcp23s08: Fix sleeping in atomic context due to regmap locking

If a device uses MCP23xxx IO expander to receive IRQs, the following
bug can happen:

  BUG: sleeping function called from invalid context
    at kernel/locking/mutex.c:283
  in_atomic(): 1, irqs_disabled(): 1, non_block: 0, ...
  preempt_count: 1, expected: 0
  ...
  Call Trace:
  ...
  __might_resched+0x104/0x10e
  __might_sleep+0x3e/0x62
  mutex_lock+0x20/0x4c
  regmap_lock_mutex+0x10/0x18
  regmap_update_bits_base+0x2c/0x66
  mcp23s08_irq_set_type+0x1ae/0x1d6
  __irq_set_trigger+0x56/0x172
  __setup_irq+0x1e6/0x646
  request_threaded_irq+0xb6/0x160
  ...

We observed the problem while experimenting with a touchscreen driver which
used MCP23017 IO expander (I2C).

The regmap in the pinctrl-mcp23s08 driver uses a mutex for protection from
concurrent accesses, which is the default for regmaps without .fast_io,
.disable_locking, etc.

mcp23s08_irq_set_type() calls regmap_update_bits_base(), and the latter
locks the mutex.

However, __setup_irq() locks desc-&gt;lock spinlock before calling these
functions. As a result, the system tries to lock the mutex whole holding
the spinlock.

It seems, the internal regmap locks are not needed in this driver at all.
mcp-&gt;lock seems to protect the regmap from concurrent accesses already,
except, probably, in mcp_pinconf_get/set.

mcp23s08_irq_set_type() and mcp23s08_irq_mask/unmask() are called under
chip_bus_lock(), which calls mcp23s08_irq_bus_lock(). The latter takes
mcp-&gt;lock and enables regmap caching, so that the potentially slow I2C
accesses are deferred until chip_bus_unlock().

The accesses to the regmap from mcp23s08_probe_one() do not need additional
locking.

In all remaining places where the regmap is accessed, except
mcp_pinconf_get/set(), the driver already takes mcp-&gt;lock.

This patch adds locking in mcp_pinconf_get/set() and disables internal
locking in the regmap config. Among other things, it fixes the sleeping
in atomic context described above.(CVE-2024-57889)

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

mm/smaps: fix race between smaps_hugetlb_range and migration

smaps_hugetlb_range() handles the pte without holdling ptl, and may be
concurrenct with migration, leaing to BUG_ON in pfn_swap_entry_to_page(). 
The race is as follows.

smaps_hugetlb_range              migrate_pages
  huge_ptep_get
                                   remove_migration_ptes
				   folio_unlock
  pfn_swap_entry_folio
    BUG_ON

To fix it, hold ptl lock in smaps_hugetlb_range().(CVE-2025-39754)</Note>
		<Note Title="Topic" Type="General" Ordinal="4" xml:lang="en">An update for kernel is now available for openEuler-20.03-LTS-SP4/openEuler-22.03-LTS-SP3/openEuler-22.03-LTS-SP4/openEuler-24.03-LTS-SP1.

openEuler Security has rated this update as having a security impact of medium. A Common Vunlnerability Scoring System(CVSS)base score,which gives a detailed severity rating, is available for each vulnerability from the CVElink(s) in the References section.</Note>
		<Note Title="Severity" Type="General" Ordinal="5" xml:lang="en">Medium</Note>
		<Note Title="Affected Component" Type="General" Ordinal="6" xml:lang="en">kernel</Note>
	</DocumentNotes>
	<DocumentReferences>
		<Reference Type="Self">
			<URL>https://www.openeuler.org/zh/security/security-bulletins/detail/?id=openEuler-SA-2025-2410</URL>
		</Reference>
		<Reference Type="openEuler CVE">
			<URL>https://www.openeuler.org/en/security/cve/detail/?cveId=CVE-2024-57889</URL>
			<URL>https://www.openeuler.org/en/security/cve/detail/?cveId=CVE-2025-39754</URL>
		</Reference>
		<Reference Type="Other">
			<URL>https://nvd.nist.gov/vuln/detail/CVE-2024-57889</URL>
			<URL>https://nvd.nist.gov/vuln/detail/CVE-2025-39754</URL>
		</Reference>
	</DocumentReferences>
	<ProductTree xmlns="http://www.icasi.org/CVRF/schema/prod/1.1">
		<Branch Type="Product Name" Name="openEuler">
			<FullProductName ProductID="openEuler-24.03-LTS-SP1" CPE="cpe:/a:openEuler:openEuler:24.03-LTS-SP1">openEuler-24.03-LTS-SP1</FullProductName>
		</Branch>
		<Branch Type="Package Arch" Name="src">
			<FullProductName ProductID="kernel-6.6.0-111.0.0.114" CPE="cpe:/a:openEuler:openEuler:24.03-LTS-SP1">kernel-6.6.0-111.0.0.114.oe2403sp1.src.rpm</FullProductName>
		</Branch>
		<Branch Type="Package Arch" Name="aarch64">
			<FullProductName ProductID="bpftool-6.6.0-111.0.0.114" CPE="cpe:/a:openEuler:openEuler:24.03-LTS-SP1">bpftool-6.6.0-111.0.0.114.oe2403sp1.aarch64.rpm</FullProductName>
			<FullProductName ProductID="bpftool-debuginfo-6.6.0-111.0.0.114" CPE="cpe:/a:openEuler:openEuler:24.03-LTS-SP1">bpftool-debuginfo-6.6.0-111.0.0.114.oe2403sp1.aarch64.rpm</FullProductName>
			<FullProductName ProductID="kernel-6.6.0-111.0.0.114" CPE="cpe:/a:openEuler:openEuler:24.03-LTS-SP1">kernel-6.6.0-111.0.0.114.oe2403sp1.aarch64.rpm</FullProductName>
			<FullProductName ProductID="kernel-debuginfo-6.6.0-111.0.0.114" CPE="cpe:/a:openEuler:openEuler:24.03-LTS-SP1">kernel-debuginfo-6.6.0-111.0.0.114.oe2403sp1.aarch64.rpm</FullProductName>
			<FullProductName ProductID="kernel-debugsource-6.6.0-111.0.0.114" CPE="cpe:/a:openEuler:openEuler:24.03-LTS-SP1">kernel-debugsource-6.6.0-111.0.0.114.oe2403sp1.aarch64.rpm</FullProductName>
			<FullProductName ProductID="kernel-devel-6.6.0-111.0.0.114" CPE="cpe:/a:openEuler:openEuler:24.03-LTS-SP1">kernel-devel-6.6.0-111.0.0.114.oe2403sp1.aarch64.rpm</FullProductName>
			<FullProductName ProductID="kernel-headers-6.6.0-111.0.0.114" CPE="cpe:/a:openEuler:openEuler:24.03-LTS-SP1">kernel-headers-6.6.0-111.0.0.114.oe2403sp1.aarch64.rpm</FullProductName>
			<FullProductName ProductID="kernel-source-6.6.0-111.0.0.114" CPE="cpe:/a:openEuler:openEuler:24.03-LTS-SP1">kernel-source-6.6.0-111.0.0.114.oe2403sp1.aarch64.rpm</FullProductName>
			<FullProductName ProductID="kernel-tools-6.6.0-111.0.0.114" CPE="cpe:/a:openEuler:openEuler:24.03-LTS-SP1">kernel-tools-6.6.0-111.0.0.114.oe2403sp1.aarch64.rpm</FullProductName>
			<FullProductName ProductID="kernel-tools-debuginfo-6.6.0-111.0.0.114" CPE="cpe:/a:openEuler:openEuler:24.03-LTS-SP1">kernel-tools-debuginfo-6.6.0-111.0.0.114.oe2403sp1.aarch64.rpm</FullProductName>
			<FullProductName ProductID="kernel-tools-devel-6.6.0-111.0.0.114" CPE="cpe:/a:openEuler:openEuler:24.03-LTS-SP1">kernel-tools-devel-6.6.0-111.0.0.114.oe2403sp1.aarch64.rpm</FullProductName>
			<FullProductName ProductID="perf-6.6.0-111.0.0.114" CPE="cpe:/a:openEuler:openEuler:24.03-LTS-SP1">perf-6.6.0-111.0.0.114.oe2403sp1.aarch64.rpm</FullProductName>
			<FullProductName ProductID="perf-debuginfo-6.6.0-111.0.0.114" CPE="cpe:/a:openEuler:openEuler:24.03-LTS-SP1">perf-debuginfo-6.6.0-111.0.0.114.oe2403sp1.aarch64.rpm</FullProductName>
			<FullProductName ProductID="python3-perf-6.6.0-111.0.0.114" CPE="cpe:/a:openEuler:openEuler:24.03-LTS-SP1">python3-perf-6.6.0-111.0.0.114.oe2403sp1.aarch64.rpm</FullProductName>
			<FullProductName ProductID="python3-perf-debuginfo-6.6.0-111.0.0.114" CPE="cpe:/a:openEuler:openEuler:24.03-LTS-SP1">python3-perf-debuginfo-6.6.0-111.0.0.114.oe2403sp1.aarch64.rpm</FullProductName>
		</Branch>
		<Branch Type="Package Arch" Name="x86_64">
			<FullProductName ProductID="bpftool-6.6.0-111.0.0.114" CPE="cpe:/a:openEuler:openEuler:24.03-LTS-SP1">bpftool-6.6.0-111.0.0.114.oe2403sp1.x86_64.rpm</FullProductName>
			<FullProductName ProductID="bpftool-debuginfo-6.6.0-111.0.0.114" CPE="cpe:/a:openEuler:openEuler:24.03-LTS-SP1">bpftool-debuginfo-6.6.0-111.0.0.114.oe2403sp1.x86_64.rpm</FullProductName>
			<FullProductName ProductID="kernel-6.6.0-111.0.0.114" CPE="cpe:/a:openEuler:openEuler:24.03-LTS-SP1">kernel-6.6.0-111.0.0.114.oe2403sp1.x86_64.rpm</FullProductName>
			<FullProductName ProductID="kernel-debuginfo-6.6.0-111.0.0.114" CPE="cpe:/a:openEuler:openEuler:24.03-LTS-SP1">kernel-debuginfo-6.6.0-111.0.0.114.oe2403sp1.x86_64.rpm</FullProductName>
			<FullProductName ProductID="kernel-debugsource-6.6.0-111.0.0.114" CPE="cpe:/a:openEuler:openEuler:24.03-LTS-SP1">kernel-debugsource-6.6.0-111.0.0.114.oe2403sp1.x86_64.rpm</FullProductName>
			<FullProductName ProductID="kernel-devel-6.6.0-111.0.0.114" CPE="cpe:/a:openEuler:openEuler:24.03-LTS-SP1">kernel-devel-6.6.0-111.0.0.114.oe2403sp1.x86_64.rpm</FullProductName>
			<FullProductName ProductID="kernel-headers-6.6.0-111.0.0.114" CPE="cpe:/a:openEuler:openEuler:24.03-LTS-SP1">kernel-headers-6.6.0-111.0.0.114.oe2403sp1.x86_64.rpm</FullProductName>
			<FullProductName ProductID="kernel-source-6.6.0-111.0.0.114" CPE="cpe:/a:openEuler:openEuler:24.03-LTS-SP1">kernel-source-6.6.0-111.0.0.114.oe2403sp1.x86_64.rpm</FullProductName>
			<FullProductName ProductID="kernel-tools-6.6.0-111.0.0.114" CPE="cpe:/a:openEuler:openEuler:24.03-LTS-SP1">kernel-tools-6.6.0-111.0.0.114.oe2403sp1.x86_64.rpm</FullProductName>
			<FullProductName ProductID="kernel-tools-debuginfo-6.6.0-111.0.0.114" CPE="cpe:/a:openEuler:openEuler:24.03-LTS-SP1">kernel-tools-debuginfo-6.6.0-111.0.0.114.oe2403sp1.x86_64.rpm</FullProductName>
			<FullProductName ProductID="kernel-tools-devel-6.6.0-111.0.0.114" CPE="cpe:/a:openEuler:openEuler:24.03-LTS-SP1">kernel-tools-devel-6.6.0-111.0.0.114.oe2403sp1.x86_64.rpm</FullProductName>
			<FullProductName ProductID="perf-6.6.0-111.0.0.114" CPE="cpe:/a:openEuler:openEuler:24.03-LTS-SP1">perf-6.6.0-111.0.0.114.oe2403sp1.x86_64.rpm</FullProductName>
			<FullProductName ProductID="perf-debuginfo-6.6.0-111.0.0.114" CPE="cpe:/a:openEuler:openEuler:24.03-LTS-SP1">perf-debuginfo-6.6.0-111.0.0.114.oe2403sp1.x86_64.rpm</FullProductName>
			<FullProductName ProductID="python3-perf-6.6.0-111.0.0.114" CPE="cpe:/a:openEuler:openEuler:24.03-LTS-SP1">python3-perf-6.6.0-111.0.0.114.oe2403sp1.x86_64.rpm</FullProductName>
			<FullProductName ProductID="python3-perf-debuginfo-6.6.0-111.0.0.114" CPE="cpe:/a:openEuler:openEuler:24.03-LTS-SP1">python3-perf-debuginfo-6.6.0-111.0.0.114.oe2403sp1.x86_64.rpm</FullProductName>
		</Branch>
	</ProductTree>
	<Vulnerability Ordinal="1" xmlns="http://www.icasi.org/CVRF/schema/vuln/1.1">
		<Notes>
			<Note Title="Vulnerability Description" Type="General" Ordinal="1" xml:lang="en">In the Linux kernel, the following vulnerability has been resolved:

pinctrl: mcp23s08: Fix sleeping in atomic context due to regmap locking

If a device uses MCP23xxx IO expander to receive IRQs, the following
bug can happen:

  BUG: sleeping function called from invalid context
    at kernel/locking/mutex.c:283
  in_atomic(): 1, irqs_disabled(): 1, non_block: 0, ...
  preempt_count: 1, expected: 0
  ...
  Call Trace:
  ...
  __might_resched+0x104/0x10e
  __might_sleep+0x3e/0x62
  mutex_lock+0x20/0x4c
  regmap_lock_mutex+0x10/0x18
  regmap_update_bits_base+0x2c/0x66
  mcp23s08_irq_set_type+0x1ae/0x1d6
  __irq_set_trigger+0x56/0x172
  __setup_irq+0x1e6/0x646
  request_threaded_irq+0xb6/0x160
  ...

We observed the problem while experimenting with a touchscreen driver which
used MCP23017 IO expander (I2C).

The regmap in the pinctrl-mcp23s08 driver uses a mutex for protection from
concurrent accesses, which is the default for regmaps without .fast_io,
.disable_locking, etc.

mcp23s08_irq_set_type() calls regmap_update_bits_base(), and the latter
locks the mutex.

However, __setup_irq() locks desc-&gt;lock spinlock before calling these
functions. As a result, the system tries to lock the mutex whole holding
the spinlock.

It seems, the internal regmap locks are not needed in this driver at all.
mcp-&gt;lock seems to protect the regmap from concurrent accesses already,
except, probably, in mcp_pinconf_get/set.

mcp23s08_irq_set_type() and mcp23s08_irq_mask/unmask() are called under
chip_bus_lock(), which calls mcp23s08_irq_bus_lock(). The latter takes
mcp-&gt;lock and enables regmap caching, so that the potentially slow I2C
accesses are deferred until chip_bus_unlock().

The accesses to the regmap from mcp23s08_probe_one() do not need additional
locking.

In all remaining places where the regmap is accessed, except
mcp_pinconf_get/set(), the driver already takes mcp-&gt;lock.

This patch adds locking in mcp_pinconf_get/set() and disables internal
locking in the regmap config. Among other things, it fixes the sleeping
in atomic context described above.</Note>
		</Notes>
		<ReleaseDate>2025-10-11</ReleaseDate>
		<CVE>CVE-2024-57889</CVE>
		<ProductStatuses>
			<Status Type="Fixed">
				<ProductID>openEuler-24.03-LTS-SP1</ProductID>
			</Status>
		</ProductStatuses>
		<Threats>
			<Threat Type="Impact">
				<Description>Low</Description>
			</Threat>
		</Threats>
		<CVSSScoreSets>
			<ScoreSet>
				<BaseScore>2.6</BaseScore>
				<Vector>AV:A/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:L</Vector>
			</ScoreSet>
		</CVSSScoreSets>
		<Remediations>
			<Remediation Type="Vendor Fix">
				<Description>kernel security update</Description>
				<DATE>2025-10-11</DATE>
				<URL>https://www.openeuler.org/zh/security/security-bulletins/detail/?id=openEuler-SA-2025-2410</URL>
			</Remediation>
		</Remediations>
	</Vulnerability>
	<Vulnerability Ordinal="2" xmlns="http://www.icasi.org/CVRF/schema/vuln/1.1">
		<Notes>
			<Note Title="Vulnerability Description" Type="General" Ordinal="1" xml:lang="en">In the Linux kernel, the following vulnerability has been resolved:

mm/smaps: fix race between smaps_hugetlb_range and migration

smaps_hugetlb_range() handles the pte without holdling ptl, and may be
concurrenct with migration, leaing to BUG_ON in pfn_swap_entry_to_page(). 
The race is as follows.

smaps_hugetlb_range              migrate_pages
  huge_ptep_get
                                   remove_migration_ptes
				   folio_unlock
  pfn_swap_entry_folio
    BUG_ON

To fix it, hold ptl lock in smaps_hugetlb_range().</Note>
		</Notes>
		<ReleaseDate>2025-10-11</ReleaseDate>
		<CVE>CVE-2025-39754</CVE>
		<ProductStatuses>
			<Status Type="Fixed">
				<ProductID>openEuler-24.03-LTS-SP1</ProductID>
			</Status>
		</ProductStatuses>
		<Threats>
			<Threat Type="Impact">
				<Description>Medium</Description>
			</Threat>
		</Threats>
		<CVSSScoreSets>
			<ScoreSet>
				<BaseScore>5.5</BaseScore>
				<Vector>AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H</Vector>
			</ScoreSet>
		</CVSSScoreSets>
		<Remediations>
			<Remediation Type="Vendor Fix">
				<Description>kernel security update</Description>
				<DATE>2025-10-11</DATE>
				<URL>https://www.openeuler.org/zh/security/security-bulletins/detail/?id=openEuler-SA-2025-2410</URL>
			</Remediation>
		</Remediations>
	</Vulnerability>
</cvrfdoc>