Skip to content

[v26.1.x] kafka: prevent UB in collect_mapper() for DescribeLogDirs - #31196

Merged
WillemKauf merged 1 commit into
redpanda-data:v26.1.xfrom
vbotbuildovich:ai-backport-pr-31173-v26.1.x-1784579884
Jul 20, 2026
Merged

[v26.1.x] kafka: prevent UB in collect_mapper() for DescribeLogDirs#31196
WillemKauf merged 1 commit into
redpanda-data:v26.1.xfrom
vbotbuildovich:ai-backport-pr-31173-v26.1.x-1784579884

Conversation

@vbotbuildovich

Copy link
Copy Markdown
Collaborator

Backport of PR #31173

  • Command: git cherry-pick -x 5dbe303
  • Commits backported: 1
  • Conflicts resolved: 1
  • Commits skipped (already on target): 0
  • Backport branch: ai-backport-pr-31173-v26.1.x-1784579884

Conflict details

  • 5dbe303 (src/v/kafka/server/handlers/describe_log_dirs.cc): include block conflicted — the target branch v26.1.x carries #include "model/namespace.h" (absent on dev) in the same spot where the commit adds #include "model/ktp.h". Kept both includes in alphabetical order: the backported code needs model::ktp while the target branch still relies on model/namespace.h.

We were iterating over a mutable container with scheduling points.
No good.

Fix it by copying first, then doing the iteration with scheduling points.

(cherry picked from commit 5dbe303)
@vbotbuildovich vbotbuildovich added this to the v26.1.x-next milestone Jul 20, 2026
@vbotbuildovich vbotbuildovich added the kind/backport PRs targeting a stable branch label Jul 20, 2026
@WillemKauf
WillemKauf enabled auto-merge July 20, 2026 20:54
@WillemKauf
WillemKauf merged commit 05aca75 into redpanda-data:v26.1.x Jul 20, 2026
18 checks passed
@tyson-redpanda tyson-redpanda modified the milestones: v26.1.x-next, v26.1.14 Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/redpanda kind/backport PRs targeting a stable branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants