Skip to content

kernel/mediatek: fix null dereference in dynamic calibration patch#23205

Merged
openwrt-bot merged 1 commit into
openwrt:openwrt-25.12from
pcc:calib
Jun 25, 2026
Merged

kernel/mediatek: fix null dereference in dynamic calibration patch#23205
openwrt-bot merged 1 commit into
openwrt:openwrt-25.12from
pcc:calib

Conversation

@pcc

@pcc pcc commented May 3, 2026

Copy link
Copy Markdown
Contributor

KASAN reported a null dereference in this patch. Fix it.

@openwrt-ai openwrt-ai 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.

Reviewed 1 new commit; 1 inline question raised.


Generated by Claude Code

+ int datalen = ctlr->cal_rule->datalen;
+ int addrlen = ctlr->cal_rule->addrlen;
+ int datalen;
+ int addrlen;

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.

The same null-deref pattern exists in patches-6.18/432-drivers-spi-Add-support-for-dynamic-calibration.patch (int datalen = ctlr->cal_rule->datalen; / int addrlen = ctlr->cal_rule->addrlen; ahead of the if(!ctlr->cal_target || !ctlr->cal_rule || !ctlr->append_caldata) guard at line 30). target/linux/mediatek/Makefile sets KERNEL_PATCHVER:=6.18, so the 6.18 patch is the one actually built on this branch (and on main, where patches-6.12/ no longer exists). Should this PR also patch the 6.18 copy, or is it intentionally limited to 6.12?


Generated by Claude Code

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Looks like Claude is looking at the wrong branch, it's KERNEL_PATCHVER:=6.12 on 25.12. A separate PR will be needed for 6.18 on main.

@github-actions github-actions Bot added target/mediatek pull request/issue for mediatek target release/25.12 pull request/issue targeted (also) for OpenWrt 24.10 release labels May 3, 2026

@openwrt-ai openwrt-ai 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.

No issues found.


To address review feedback, force-push fixes to this branch. Don't close and open a new PR — that loses the review history and the bot starts from scratch.


Generated by Claude Code

@openwrt-ai openwrt-ai 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.

Reviewed 1 new commit; no new issues found.


To address review feedback, force-push fixes to this branch. Don't close and open a new PR — that loses the review history and the bot starts from scratch.


Generated by Claude Code

@hauke

hauke commented May 4, 2026

Copy link
Copy Markdown
Member

Please add this to the main branch first, we can then backport it to 25.12.

@pcc

pcc commented May 6, 2026

Copy link
Copy Markdown
Contributor Author

Rebased to main: #23237

@pcc
pcc force-pushed the calib branch 2 times, most recently from 662b4c6 to 32b9e94 Compare May 19, 2026 06:37
@pcc pcc changed the title kernel/mediatek: Fix null dereference in dynamic calibration patch kernel/mediatek: fix null dereference in dynamic calibration patch May 19, 2026

@openwrt-ai openwrt-ai 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.

Reviewed 1 new commit; no new issues found.


Generated by Claude Code

KASAN reported a null dereference in this patch. Fix it.

Signed-off-by: Peter Collingbourne <peter@pcc.me.uk>
Link: openwrt#23237
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
(cherry picked from commit 317317d)
Link: openwrt#23205
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
@openwrt-bot
openwrt-bot merged commit d34a54f into openwrt:openwrt-25.12 Jun 25, 2026
1 check passed
oxavelar pushed a commit to oxavelar/openwrt that referenced this pull request Jul 2, 2026
KASAN reported a null dereference in this patch. Fix it.

Signed-off-by: Peter Collingbourne <peter@pcc.me.uk>
Link: openwrt#23237
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
(cherry picked from commit 317317d)
Link: openwrt#23205
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
liudf0716 pushed a commit to liudf0716/chawrt that referenced this pull request Jul 21, 2026
KASAN reported a null dereference in this patch. Fix it.

Signed-off-by: Peter Collingbourne <peter@pcc.me.uk>
Link: openwrt/openwrt#23237
Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
(cherry picked from commit 317317d960e3edb5891ee4d25c3d654074cb568d)
Link: openwrt/openwrt#23205
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
(cherry picked from commit d34a54f4db2af3224576ed1c2c72989426efcdf5)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release/25.12 pull request/issue targeted (also) for OpenWrt 24.10 release target/mediatek pull request/issue for mediatek target

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants