Skip to content

Conversation

@roxanan1996
Copy link
Contributor

@roxanan1996 roxanan1996 commented Dec 10, 2025

DESCRIPTION

These are commits that were pretty easy to backport.
Some were applied cleanly, some required only a prereq.
The last one had to be manually fix since the context is slightly changed due
to internal red hat kabi fix.
Otherwise, it should be straightforward to review.

Notes

  1. After a discussion with Maple, I should send separate pull requests for each CVE if possible, or at least split them based on the subsystem. But that's for the future, I'll keep this one as it is.
  2. Please check below the explanation about interdiff differences.

COMMITS

ALSA: usb-audio: Validate UAC3 cluster segment descriptors

jira VULN-152932
cve CVE-2025-39757
commit-author Takashi Iwai <[email protected]>
commit ecfd41166b72b67d3bdeb88d224ff445f6163869
ALSA: usb-audio: Fix size validation in convert_chmap_v3()

jira VULN-152932
cve-bf CVE-2025-39757
commit-author Dan Carpenter <[email protected]>
commit 89f0addeee3cb2dc49837599330ed9c4612f05b0
net: sched: delete duplicate cleanup of backlog and qlen

jira VULN-155239
cve-pre CVE-2022-50356
commit-author Zhengchao Shao <[email protected]>
commit c19d893fbf3f2f8fa864ae39652c7fee939edde2
net: sched: sfb: fix null pointer access issue when sfb_init() fails

jira VULN-155239
cve CVE-2022-50356
commit-author Zhengchao Shao <[email protected]>
commit 2a3fc78210b9f0e85372a2435368962009f480fc
scsi: lpfc: Terminate string in lpfc_debugfs_nvmeio_trc_write()

jira VULN-70476
cve-pre CVE-2022-50030
commit-author Dan Carpenter <[email protected]>
commit 9020be114a47bf7ff33e179b3bb0016b91a098e6
scsi: lpfc: Prevent buffer overflow crashes in debugfs with malformed user input

jira VULN-70476
cve CVE-2022-50030
commit-author James Smart <[email protected]>
commit f8191d40aa612981ce897e66cda6a88db8df17bb
fs: fix UAF/GPF bug in nilfs_mdt_destroy

jira VULN-155283
cve CVE-2022-50367
commit-author Dongliang Mu <[email protected]>
commit 2e488f13755ffbb60f307e991b27024716a33b29
upstream-diff |
	Adjusted context in inode_init_always to due rh specific variable
	rh_reserved2 being initialized to 0 added in commit:
	dbb05b7432a1f9 ("Rebuild centos8 with kernel-4.18.0-80.el8")

TESTING

BUILD

> grep -E -B 5 -A 5 '\[TIMER\]|^Starting Build' /home/rnicolescu/ciq/kernels/lts-8.6_easy_vulns/kernel-build-after.log
/home/rnicolescu/ciq/kernels/lts-8.6_easy_vulns/kernel-src-tree
Running make mrproper...
[TIMER]{MRPROPER}: 13s
x86_64 architecture detected, copying config
'configs/kernel-x86_64.config' -> '.config'
Setting Local Version for build
CONFIG_LOCALVERSION="-rnicolescu_ciqlts8_6_easy_vulns-a3868bcfb11b2"
Making olddefconfig
--
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf  --olddefconfig Kconfig
#
# configuration written to .config
#
Starting Build
scripts/kconfig/conf  --syncconfig Kconfig
  SYSTBL  arch/x86/include/generated/asm/syscalls_32.h
  SYSHDR  arch/x86/include/generated/asm/unistd_32_ia32.h
  SYSHDR  arch/x86/include/generated/asm/unistd_64_x32.h
  SYSTBL  arch/x86/include/generated/asm/syscalls_64.h
--
  LD [M]  sound/usb/usx2y/snd-usb-usx2y.ko
  LD [M]  sound/virtio/virtio_snd.ko
  LD [M]  sound/x86/snd-hdmi-lpe-audio.ko
  LD [M]  sound/xen/snd_xen_front.ko
  LD [M]  virt/lib/irqbypass.ko
[TIMER]{BUILD}: 2633s
Making Modules
  INSTALL arch/x86/crypto/blowfish-x86_64.ko
  INSTALL arch/x86/crypto/camellia-aesni-avx-x86_64.ko
  INSTALL arch/x86/crypto/camellia-aesni-avx2.ko
  INSTALL arch/x86/crypto/camellia-x86_64.ko
--
  INSTALL sound/virtio/virtio_snd.ko
  INSTALL sound/x86/snd-hdmi-lpe-audio.ko
  INSTALL sound/xen/snd_xen_front.ko
  INSTALL virt/lib/irqbypass.ko
  DEPMOD  4.18.0-rnicolescu_ciqlts8_6_easy_vulns-a3868bcfb11b2+
[TIMER]{MODULES}: 10s
Making Install
sh ./arch/x86/boot/install.sh 4.18.0-rnicolescu_ciqlts8_6_easy_vulns-a3868bcfb11b2+ arch/x86/boot/bzImage \
	System.map "/boot"
[TIMER]{INSTALL}: 31s
Checking kABI
kABI check passed
Setting Default Kernel to /boot/vmlinuz-4.18.0-rnicolescu_ciqlts8_6_easy_vulns-a3868bcfb11b2+ and Index to 2
The default is /boot/loader/entries/d9e0711368554fce865850e4faca8049-4.18.0-rnicolescu_ciqlts8_6_easy_vulns-a3868bcfb11b2+.conf with index 2 and kernel /boot/vmlinuz-4.18.0-rnicolescu_ciqlts8_6_easy_vulns-a3868bcfb11b2+
The default is /boot/loader/entries/d9e0711368554fce865850e4faca8049-4.18.0-rnicolescu_ciqlts8_6_easy_vulns-a3868bcfb11b2+.conf with index 2 and kernel /boot/vmlinuz-4.18.0-rnicolescu_ciqlts8_6_easy_vulns-a3868bcfb11b2+
Generating grub configuration file ...
done
Hopefully Grub2.0 took everything ... rebooting after time metrices
[TIMER]{MRPROPER}: 13s
[TIMER]{BUILD}: 2633s
[TIMER]{MODULES}: 10s
[TIMER]{INSTALL}: 31s
[TIMER]{TOTAL} 2696s
Rebooting in 10 seconds

Kselftests

> /home/rnicolescu/ciq/kernel-tools/kselftest-diff.sh /home/rnicolescu/ciq/kernels/lts-8.6_easy_vulns
./kselftest-before.log
212
./kselftest-after.log
212
Before: ./kselftest-before.log
After: ./kselftest-after.log
Diff:
No differences found.

Check_kernel_commits

> python3 /home/rnicolescu/ciq/kernel-src-tree-tools/check_kernel_commits.py --repo /home/rnicolescu/ciq/kernels/lts-8.6_easy_vulns/kernel-src-tree --pr_branch {rnicolescu}_ciqlts8_6_easy_vulns --base_branch origin/ciqlts8_6 --check-cves
All referenced commits exist upstream and have no Fixes: tags.

Run jira_pr_check

> python3 /home/rnicolescu/ciq/kernel-src-tree-tools/jira_pr_check.py --kernel-src-tree /home/rnicolescu/ciq/kernels/lts-8.6_easy_vulns/kernel-src-tree --merge-target {rnicolescu}_ciqlts8_6_easy_vulns --pr-branch origin/ciqlts8_6

## JIRA PR Check Results

✅ **No issues found!**


---
**Summary:** Checked 0 commit(s) total.

@roxanan1996 roxanan1996 self-assigned this Dec 10, 2025
@roxanan1996 roxanan1996 marked this pull request as draft December 10, 2025 14:13
@github-actions
Copy link

🔍 Interdiff Analysis

  • ⚠️ PR commit fad75018ba11 (ALSA: usb-audio: Validate UAC3 cluster segment descriptors) → upstream ecfd41166b72
    Differences found:
diff -u b/sound/usb/stream.c b/sound/usb/stream.c
--- b/sound/usb/stream.c
+++ b/sound/usb/stream.c
@@ -355,6 +360,9 @@ INTERDIFF: rejected hunk from patch1, cannot diff context
 			struct uac3_cluster_information_segment_descriptor *is = p;
 			unsigned char map;
 
+			if (cs_len < sizeof(*is))
+				break;
+
 			/*
 			 * TODO: this conversion is not complete, update it
 			 * after adding UAC3 values to asound.h
@@ -360,6 +365,9 @@ INTERDIFF: rejected hunk from patch2, cannot diff context
 			struct uac3_cluster_information_segment_descriptor *is = p;
 			unsigned char map;
 
+			if (cs_len < sizeof(*is))
+				break;
+
 			/*
 			 * TODO: this conversion is not complete, update it
 			 * after adding UAC3 values to asound.h
  • ⚠️ PR commit 4ea57db54a1d (ASoC: SOF: Intel: hda: Fix potential buffer overflow by snprintf()) → upstream 94c1ceb043c1
    Differences found:
diff -u b/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c
--- b/sound/soc/sof/intel/hda.c
+++ b/sound/soc/sof/intel/hda.c
@@ -543,4 +543,4 @@
 		len += scnprintf(msg + len, sizeof(msg) - len, " 0x%x", value);
 	}
 
-	dev_printk(level, sdev->dev, "extended rom status: %s", msg);
+	dev_err(sdev->dev, "extended rom status: %s", msg);
  • ⚠️ PR commit a3868bcfb11b (fs: fix UAF/GPF bug in nilfs_mdt_destroy) → upstream 2e488f13755f
    Differences found:
diff -u b/fs/inode.c b/fs/inode.c
--- b/fs/inode.c
+++ b/fs/inode.c
@@ -165,5 +165,5 @@
-	inode->i_wb_frn_history = 0;
-#endif
+
+	inode->rh_reserved2 = 0;
 
 	spin_lock_init(&inode->i_lock);
 	lockdep_set_class(&inode->i_lock, &sb->s_type->i_lock_key);

This is an automated interdiff check for backported commits.

@roxanan1996
Copy link
Contributor Author

roxanan1996 commented Dec 10, 2025

🔍 Interdiff Analysis

* ⚠️ PR commit `fad75018ba11 (ALSA: usb-audio: Validate UAC3 cluster segment descriptors)` → upstream `ecfd41166b72`
  **Differences found:**
diff -u b/sound/usb/stream.c b/sound/usb/stream.c
--- b/sound/usb/stream.c
+++ b/sound/usb/stream.c
@@ -355,6 +360,9 @@ INTERDIFF: rejected hunk from patch1, cannot diff context
 			struct uac3_cluster_information_segment_descriptor *is = p;
 			unsigned char map;
 
+			if (cs_len < sizeof(*is))
+				break;
+
 			/*
 			 * TODO: this conversion is not complete, update it
 			 * after adding UAC3 values to asound.h
@@ -360,6 +365,9 @@ INTERDIFF: rejected hunk from patch2, cannot diff context
 			struct uac3_cluster_information_segment_descriptor *is = p;
 			unsigned char map;
 
+			if (cs_len < sizeof(*is))
+				break;
+
 			/*
 			 * TODO: this conversion is not complete, update it
 			 * after adding UAC3 values to asound.h

This is a bug in interdiff, the patch looks fine. Check colordiff log
colordiff.log
Colordiff checks the whole function context, you may see a small diff because commit
6aa8700 ("ALSA: usb-audio: Support multiple control interfaces")
was not backported. But it should not be, since it's a new feature and not relevant for this CVE fix.

* ⚠️ PR commit `4ea57db54a1d (ASoC: SOF: Intel: hda: Fix potential buffer overflow by snprintf())` → upstream `94c1ceb043c1`
  **Differences found:**
diff -u b/sound/soc/sof/intel/hda.c b/sound/soc/sof/intel/hda.c
--- b/sound/soc/sof/intel/hda.c
+++ b/sound/soc/sof/intel/hda.c
@@ -543,4 +543,4 @@
 		len += scnprintf(msg + len, sizeof(msg) - len, " 0x%x", value);
 	}
 
-	dev_printk(level, sdev->dev, "extended rom status: %s", msg);
+	dev_err(sdev->dev, "extended rom status: %s", msg);

This is due to missing commit 34bfba9 ("ASoC: SOF: Intel: hda: Use DEBUG log level for optional prints").
Not relevant here

* ⚠️ PR commit `a3868bcfb11b (fs: fix UAF/GPF bug in nilfs_mdt_destroy)` → upstream `2e488f13755f`
  **Differences found:**
diff -u b/fs/inode.c b/fs/inode.c
--- b/fs/inode.c
+++ b/fs/inode.c
@@ -165,5 +165,5 @@
-	inode->i_wb_frn_history = 0;
-#endif
+
+	inode->rh_reserved2 = 0;
 
 	spin_lock_init(&inode->i_lock);
 	lockdep_set_class(&inode->i_lock, &sb->s_type->i_lock_key);

This is expected since inode->rh_reserved2 = 0 is red hat specific.

This is an automated interdiff check for backported commits.

@roxanan1996 roxanan1996 marked this pull request as ready for review December 12, 2025 15:01
@roxanan1996 roxanan1996 requested a review from a team December 12, 2025 15:01
bmastbergen
bmastbergen previously approved these changes Dec 12, 2025
Copy link
Collaborator

@bmastbergen bmastbergen left a comment

Choose a reason for hiding this comment

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

🥌

@PlaidCat PlaidCat requested a review from a team December 17, 2025 23:13
Copy link
Collaborator

@PlaidCat PlaidCat left a comment

Choose a reason for hiding this comment

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

Please Revert and manually deal with the changes for cve-2022-50087
30254c3 firmware: arm_scpi: convert platform driver to use dev_groups

We can't take this change in the event that some actually uses this driver.
this is a part of a larger change set that actually implements in another place the code that is referenced being dropped
We need this commit to take this change
torvalds/linux@23b6904

which is a part of a larger fix up
https://lore.kernel.org/all/[email protected]/t/#u

@roxanan1996
Copy link
Contributor Author

roxanan1996 commented Dec 18, 2025

Please Revert and manually deal with the changes for cve-2022-50087 30254c3 firmware: arm_scpi: convert platform driver to use dev_groups

We can't take this change in the event that some actually uses this driver. this is a part of a larger change set that actually implements in another place the code that is referenced being dropped We need this commit to take this change torvalds/linux@23b6904

which is a part of a larger fix up https://lore.kernel.org/all/[email protected]/t/#u

I thought I checked that. Great catch.
I removed it from this merge request.

I did the same for "ASoC: SOF: Intel: hda: Define rom_status_reg in sof_intel_dsp_desc" as the prereq is patch from a bigger patchset.
Will address these in separate merge requests.
Thanks!

jira VULN-152932
cve CVE-2025-39757
commit-author Takashi Iwai <[email protected]>
commit ecfd411

UAC3 class segment descriptors need to be verified whether their sizes
match with the declared lengths and whether they fit with the
allocated buffer sizes, too.  Otherwise malicious firmware may lead to
the unexpected OOB accesses.

Fixes: 11785ef ("ALSA: usb-audio: Initial Power Domain support")
Reported-and-tested-by: Youngjun Lee <[email protected]>
	Cc: <[email protected]>
Link: https://patch.msgid.link/[email protected]
	Signed-off-by: Takashi Iwai <[email protected]>
(cherry picked from commit ecfd411)
	Signed-off-by: Roxana Nicolescu <[email protected]>
jira VULN-152932
cve-bf CVE-2025-39757
commit-author Dan Carpenter <[email protected]>
commit 89f0add

The "p" pointer is void so sizeof(*p) is 1.  The intent was to check
sizeof(*cs_desc), which is 3, instead.

Fixes: ecfd411 ("ALSA: usb-audio: Validate UAC3 cluster segment descriptors")
	Signed-off-by: Dan Carpenter <[email protected]>
Link: https://patch.msgid.link/[email protected]
	Signed-off-by: Takashi Iwai <[email protected]>
(cherry picked from commit 89f0add)
	Signed-off-by: Roxana Nicolescu <[email protected]>
jira VULN-155239
cve-pre CVE-2022-50356
commit-author Zhengchao Shao <[email protected]>
commit c19d893

qdisc_reset() is clearing qdisc->q.qlen and qdisc->qstats.backlog
_after_ calling qdisc->ops->reset. There is no need to clear them
again in the specific reset function.

	Signed-off-by: Zhengchao Shao <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
	Signed-off-by: Paolo Abeni <[email protected]>
(cherry picked from commit c19d893)
	Signed-off-by: Roxana Nicolescu <[email protected]>
jira VULN-155239
cve CVE-2022-50356
commit-author Zhengchao Shao <[email protected]>
commit 2a3fc78

When the default qdisc is sfb, if the qdisc of dev_queue fails to be
inited during mqprio_init(), sfb_reset() is invoked to clear resources.
In this case, the q->qdisc is NULL, and it will cause gpf issue.

The process is as follows:
qdisc_create_dflt()
	sfb_init()
		tcf_block_get()          --->failed, q->qdisc is NULL
	...
	qdisc_put()
		...
		sfb_reset()
			qdisc_reset(q->qdisc)    --->q->qdisc is NULL
				ops = qdisc->ops

The following is the Call Trace information:
general protection fault, probably for non-canonical address
0xdffffc0000000003: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000018-0x000000000000001f]
RIP: 0010:qdisc_reset+0x2b/0x6f0
Call Trace:
<TASK>
sfb_reset+0x37/0xd0
qdisc_reset+0xed/0x6f0
qdisc_destroy+0x82/0x4c0
qdisc_put+0x9e/0xb0
qdisc_create_dflt+0x2c3/0x4a0
mqprio_init+0xa71/0x1760
qdisc_create+0x3eb/0x1000
tc_modify_qdisc+0x408/0x1720
rtnetlink_rcv_msg+0x38e/0xac0
netlink_rcv_skb+0x12d/0x3a0
netlink_unicast+0x4a2/0x740
netlink_sendmsg+0x826/0xcc0
sock_sendmsg+0xc5/0x100
____sys_sendmsg+0x583/0x690
___sys_sendmsg+0xe8/0x160
__sys_sendmsg+0xbf/0x160
do_syscall_64+0x35/0x80
entry_SYSCALL_64_after_hwframe+0x46/0xb0
RIP: 0033:0x7f2164122d04
</TASK>

Fixes: e13e02a ("net_sched: SFB flow scheduler")
	Signed-off-by: Zhengchao Shao <[email protected]>
	Signed-off-by: David S. Miller <[email protected]>
(cherry picked from commit 2a3fc78)
	Signed-off-by: Roxana Nicolescu <[email protected]>
jira VULN-70476
cve-pre CVE-2022-50030
commit-author Dan Carpenter <[email protected]>
commit 9020be1

The "mybuf" string comes from the user, so we need to ensure that it is NUL
terminated.

Link: https://lore.kernel.org/r/20211214070527.GA27934@kili
Fixes: bd2cdd5 ("scsi: lpfc: NVME Initiator: Add debugfs support")
	Reviewed-by: James Smart <[email protected]>
	Signed-off-by: Dan Carpenter <[email protected]>
	Signed-off-by: Martin K. Petersen <[email protected]>
(cherry picked from commit 9020be1)
	Signed-off-by: Roxana Nicolescu <[email protected]>
… user input

jira VULN-70476
cve CVE-2022-50030
commit-author James Smart <[email protected]>
commit f8191d4

Malformed user input to debugfs results in buffer overflow crashes.  Adapt
input string lengths to fit within internal buffers, leaving space for NULL
terminators.

Link: https://lore.kernel.org/r/[email protected]
Co-developed-by: Justin Tee <[email protected]>
	Signed-off-by: Justin Tee <[email protected]>
	Signed-off-by: James Smart <[email protected]>
	Signed-off-by: Martin K. Petersen <[email protected]>
(cherry picked from commit f8191d4)
	Signed-off-by: Roxana Nicolescu <[email protected]>
jira VULN-155283
cve CVE-2022-50367
commit-author Dongliang Mu <[email protected]>
commit 2e488f1
upstream-diff |
	Adjusted context in inode_init_always to due rh specific variable
	rh_reserved2 being initialized to 0 added in commit:
	dbb05b7 ("Rebuild centos8 with kernel-4.18.0-80.el8")

In alloc_inode, inode_init_always() could return -ENOMEM if
security_inode_alloc() fails, which causes inode->i_private
uninitialized. Then nilfs_is_metadata_file_inode() returns
true and nilfs_free_inode() wrongly calls nilfs_mdt_destroy(),
which frees the uninitialized inode->i_private
and leads to crashes(e.g., UAF/GPF).

Fix this by moving security_inode_alloc just prior to
this_cpu_inc(nr_inodes)

Link: https://lkml.kernel.org/r/CAFcO6XOcf1Jj2SeGt=jJV59wmhESeSKpfR0omdFRq+J9nD1vfQ@mail.gmail.com
	Reported-by: butt3rflyh4ck <[email protected]>
	Reported-by: Hao Sun <[email protected]>
	Reported-by: Jiacheng Xu <[email protected]>
	Reviewed-by: Christian Brauner (Microsoft) <[email protected]>
	Signed-off-by: Dongliang Mu <[email protected]>
	Cc: Al Viro <[email protected]>
	Cc: [email protected]
	Signed-off-by: Al Viro <[email protected]>
(cherry picked from commit 2e488f1)
	Signed-off-by: Roxana Nicolescu <[email protected]>
@roxanan1996 roxanan1996 force-pushed the {rnicolescu}_ciqlts8_6_easy_vulns branch from 8dca1e0 to db64e8e Compare December 18, 2025 10:35
@github-actions
Copy link

🔍 Interdiff Analysis

  • ⚠️ PR commit e281493e2f0a (ALSA: usb-audio: Validate UAC3 cluster segment descriptors) → upstream ecfd41166b72
    Differences found:
diff -u b/sound/usb/stream.c b/sound/usb/stream.c
--- b/sound/usb/stream.c
+++ b/sound/usb/stream.c
@@ -355,6 +360,9 @@ INTERDIFF: rejected hunk from patch1, cannot diff context
 			struct uac3_cluster_information_segment_descriptor *is = p;
 			unsigned char map;
 
+			if (cs_len < sizeof(*is))
+				break;
+
 			/*
 			 * TODO: this conversion is not complete, update it
 			 * after adding UAC3 values to asound.h
@@ -360,6 +365,9 @@ INTERDIFF: rejected hunk from patch2, cannot diff context
 			struct uac3_cluster_information_segment_descriptor *is = p;
 			unsigned char map;
 
+			if (cs_len < sizeof(*is))
+				break;
+
 			/*
 			 * TODO: this conversion is not complete, update it
 			 * after adding UAC3 values to asound.h
  • ⚠️ PR commit db64e8eb9ad1 (fs: fix UAF/GPF bug in nilfs_mdt_destroy) → upstream 2e488f13755f
    Differences found:
diff -u b/fs/inode.c b/fs/inode.c
--- b/fs/inode.c
+++ b/fs/inode.c
@@ -165,5 +165,5 @@
-	inode->i_wb_frn_history = 0;
-#endif
+
+	inode->rh_reserved2 = 0;
 
 	spin_lock_init(&inode->i_lock);
 	lockdep_set_class(&inode->i_lock, &sb->s_type->i_lock_key);

This is an automated interdiff check for backported commits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants