Skip to content

[ciqlts9_2] Multiple patches tested (2 commits) - #1599

Merged
PlaidCat merged 2 commits into
ciqlts9_2from
{shreeya_nebusec_t3}_ciqlts9_2
Sep 10, 2026
Merged

[ciqlts9_2] Multiple patches tested (2 commits)#1599
PlaidCat merged 2 commits into
ciqlts9_2from
{shreeya_nebusec_t3}_ciqlts9_2

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)

sctp: purge outqueue on stale COOKIE-ECHO handling

jira VULN-189046
cve CVE-2026-52924
commit-author Xin Long <lucien.xin@gmail.com>
commit e374b22e9b07b72a25909621464ff74096151bfb
sctp: stream: fully roll back denied add-stream state

jira VULN-189065
cve CVE-2026-52929
commit-author Wyatt Feng <bronzed_45_vested@icloud.com>
commit a5f8a90ac9f77c678a9781c0a464b635e0d63e49

Test Results

✅ Build Stage

Architecture Build Time Total Time
x86_64 23m 26s 24m 20s
aarch64 12m 42s 13m 18s

✅ Boot Verification

✅ Kernel Selftests

Architecture Passed Failed Compared Against Status
x86_64 174 24 ciqlts9_2 ✅ No regressions
aarch64 142 26 ciqlts9_2 ✅ No regressions

✅ LTP Results

Architecture Passed Failed Compared Against Status
x86_64 1439 81 ciqlts9_2 ✅ No regressions
aarch64 1404 88 ciqlts9_2 ❌ 7 regressions

aarch64 regressions:

  • af_alg04 (PASS -> FAIL)
  • fcntl14 (PASS -> FAIL)
  • fcntl14_64 (PASS -> FAIL)
  • fork14 (PASS -> FAIL)
  • futex_cmp_requeue01 (PASS -> FAIL)
  • mmap16 (PASS -> FAIL)
  • starvation (PASS -> FAIL)

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

jira VULN-189046
cve CVE-2026-52924
commit-author Xin Long <lucien.xin@gmail.com>
commit e374b22

sctp_stream_update() is only invoked when the association is moved into
COOKIE_WAIT during association setup/reconfiguration. In this path, the
outbound stream scheduler state (stream->out_curr) is expected to be
clean, since no user data should have been transmitted yet unless the
state machine has already partially progressed.

However, a corner case exists in sctp_sf_do_5_2_6_stale(): when a
Stale Cookie ERROR is received, the association is rolled back from
COOKIE_ECHOED to COOKIE_WAIT. In this scenario, user data may already
have been queued and even bundled with the COOKIE-ECHO chunk.

During the rollback, sctp_stream_update() frees the old stream table
and installs a new one, but it does not invalidate stream->out_curr.
As a result, out_curr may still point to a freed sctp_stream_out
entry from the previous stream state.

Later, SCTP scheduler dequeue paths (FCFS, RR, PRIO, etc.) rely on
stream->out_curr->ext, which can lead to use-after-free once the old
stream state has been released via sctp_stream_free().

This results in crashes such as (reported by Yuqi):

  BUG: KASAN: slab-use-after-free in sctp_sched_fcfs_dequeue+0x13a/0x140
  Read of size 8 at addr ff1100004d4d3208 by task mini_poc/9312
  CPU: 1 UID: 1001 PID: 9312 Comm: mini_poc Not tainted
     7.1.0-rc1-00305-gbd3a4795d574 #5 PREEMPT(full)
   sctp_sched_fcfs_dequeue+0x13a/0x140
   sctp_outq_flush+0x1603/0x33e0
   sctp_do_sm+0x31c9/0x5d30
   sctp_assoc_bh_rcv+0x392/0x6f0
   sctp_inq_push+0x1db/0x270
   sctp_rcv+0x138d/0x3c10

Fix this by fully purging the association outqueue when handling the
Stale Cookie case. This ensures all pending transmit and retransmit
state is dropped, and any scheduler cached pointers are invalidated,
making it safe to rebuild stream state during COOKIE_WAIT restart.

Updating only stream->out_curr would be insufficient, since queued
and retransmittable data would still reference the old stream state and
trigger later use-after-free in dequeue paths.

Fixes: 5bbbbe3 ("sctp: introduce stream scheduler foundations")
	Reported-by: Yuan Tan <yuantan098@gmail.com>
	Reported-by: Yifan Wu <yifanwucs@gmail.com>
	Reported-by: Juefei Pu <tomapufckgml@gmail.com>
	Reported-by: Zhengchuan Liang <zcliangcn@gmail.com>
	Reported-by: Xin Liu <bird@lzu.edu.cn>
	Reported-by: Yuqi Xu <xuyq21@lenovo.com>
	Reported-by: Ren Wei <n05ec@lzu.edu.cn>
	Signed-off-by: Xin Long <lucien.xin@gmail.com>
Link: https://patch.msgid.link/94318159b9052907a6cbb7256aee8b5f8dfbfccb.1780510304.git.lucien.xin@gmail.com
	Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit e374b22)
	Signed-off-by: Shreeya Patel <spatel@ciq.com>
jira VULN-189065
cve CVE-2026-52929
commit-author Wyatt Feng <bronzed_45_vested@icloud.com>
commit a5f8a90

When ADD_OUT_STREAMS is denied, SCTP only shrinks the queued chunks and
then lowers outcnt. That leaves removed stream metadata behind, so a
later re-add can reuse a stale ext and hit a null-pointer dereference in
the scheduler get path.

Fix the rollback by tearing down the removed stream state the same way
other stream resizes do. Unschedule the current scheduler state, drop
the removed stream ext state with sctp_stream_outq_migrate(), and then
reschedule the remaining streams.

This keeps scheduler-private RR/FC/PRIO lists consistent while fully
rolling back denied outgoing stream additions.

Fixes: 637784a ("sctp: introduce priority based stream scheduler")
	Cc: stable@kernel.org
	Reported-by: Yuan Tan <yuantan098@gmail.com>
	Reported-by: Yifan Wu <yifanwucs@gmail.com>
	Reported-by: Juefei Pu <tomapufckgml@gmail.com>
	Reported-by: Zhengchuan Liang <zcliangcn@gmail.com>
	Reported-by: Xin Liu <bird@lzu.edu.cn>
	Signed-off-by: Wyatt Feng <bronzed_45_vested@icloud.com>
	Signed-off-by: Ren Wei <n05ec@lzu.edu.cn>
	Acked-by: Xin Long <lucien.xin@gmail.com>
Link: https://patch.msgid.link/d78954ecd94954653ee299400e98d74a03a6f7d3.1780603399.git.bronzed_45_vested@icloud.com
	Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit a5f8a90)
	Signed-off-by: Shreeya Patel <spatel@ciq.com>
@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 Sep 9, 2026
@shreeya-patel98 shreeya-patel98 self-assigned this Sep 10, 2026
@shreeya-patel98
shreeya-patel98 requested review from a team September 10, 2026 08:09

@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 September 10, 2026 12:47

@PlaidCat PlaidCat 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.

:shipit:

@PlaidCat
PlaidCat merged commit 64b5d50 into ciqlts9_2 Sep 10, 2026
4 of 5 checks passed
@PlaidCat
PlaidCat deleted the {shreeya_nebusec_t3}_ciqlts9_2 branch September 10, 2026 16:49
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.

3 participants