Summary: | ctld -u segfaults if ctl.conf contains a chap section within a target | ||||||
---|---|---|---|---|---|---|---|
Product: | Base System | Reporter: | Alan Somers <asomers> | ||||
Component: | bin | Assignee: | Alan Somers <asomers> | ||||
Status: | Closed FIXED | ||||||
Severity: | Affects Some People | Flags: | asomers:
mfc-stable14+
asomers: mfc-stable13+ asomers: mfc-stable12- |
||||
Priority: | --- | ||||||
Version: | 15.0-CURRENT | ||||||
Hardware: | Any | ||||||
OS: | Any | ||||||
Attachments: |
|
Description
Alan Somers
![]() ![]() Created attachment 246602 [details]
Patch to fix the described bug
This patch fixes the problem for me. I'm still waiting for another department to test it privately before I open a Phabricator review.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=2391e536c01cb51d2a2c11a0f5820481314e9ec2 commit 2391e536c01cb51d2a2c11a0f5820481314e9ec2 Author: Alan Somers <asomers@FreeBSD.org> AuthorDate: 2023-10-09 18:26:25 +0000 Commit: Alan Somers <asomers@FreeBSD.org> CommitDate: 2023-12-27 17:49:15 +0000 Fix multiple bugs with ctld's UCL parsing * Don't segfault when parsing a misformatted auth-group section * If the config file specifies a chap section within a target but no auth-group, create a new anonymous auth-group. That matches the behavior with non-UCL config files. * Protect some potential segfaults with assertions PR: 274380 MFC after: 1 week Sponsored by: Axcient Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D43198 usr.sbin/ctld/ctld.c | 1 + usr.sbin/ctld/uclparse.c | 26 ++++++++++++++++++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=c2ec8038a7f1a52c013c2d4d215363ff906c6781 commit c2ec8038a7f1a52c013c2d4d215363ff906c6781 Author: Alan Somers <asomers@FreeBSD.org> AuthorDate: 2023-10-09 18:26:25 +0000 Commit: Alan Somers <asomers@FreeBSD.org> CommitDate: 2024-01-19 20:21:40 +0000 Fix multiple bugs with ctld's UCL parsing * Don't segfault when parsing a misformatted auth-group section * If the config file specifies a chap section within a target but no auth-group, create a new anonymous auth-group. That matches the behavior with non-UCL config files. * Protect some potential segfaults with assertions PR: 274380 Sponsored by: Axcient Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D43198 (cherry picked from commit 2391e536c01cb51d2a2c11a0f5820481314e9ec2) usr.sbin/ctld/ctld.c | 1 + usr.sbin/ctld/uclparse.c | 26 ++++++++++++++++++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) A commit in branch stable/14 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=5a2767d20325d5065ae4bc04d954530150551016 commit 5a2767d20325d5065ae4bc04d954530150551016 Author: Alan Somers <asomers@FreeBSD.org> AuthorDate: 2023-10-09 18:26:25 +0000 Commit: Alan Somers <asomers@FreeBSD.org> CommitDate: 2024-01-20 01:52:38 +0000 Fix multiple bugs with ctld's UCL parsing * Don't segfault when parsing a misformatted auth-group section * If the config file specifies a chap section within a target but no auth-group, create a new anonymous auth-group. That matches the behavior with non-UCL config files. * Protect some potential segfaults with assertions PR: 274380 Sponsored by: Axcient Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D43198 (cherry picked from commit 2391e536c01cb51d2a2c11a0f5820481314e9ec2) usr.sbin/ctld/ctld.c | 1 + usr.sbin/ctld/uclparse.c | 26 ++++++++++++++++++++++++-- 2 files changed, 25 insertions(+), 2 deletions(-) |