Date: Mon, 09 Oct 2023 17:54:13 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 274380] ctld -u segfaults if ctl.conf contains a chap section within a target Message-ID: <bug-274380-227@https.bugs.freebsd.org/bugzilla/>
next in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D274380 Bug ID: 274380 Summary: ctld -u segfaults if ctl.conf contains a chap section within a target Product: Base System Version: 15.0-CURRENT Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: bin Assignee: bugs@FreeBSD.org Reporter: asomers@FreeBSD.org When using the UCL configuration format, ctld segfaults if the configuration file contains per-target chap settings. This crash is observed on both 15.0-CURRENT and 13.2-RELEASE. Stack Trace =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D #0 uclparse_chap (auth_group=3D0x0, obj=3Dobj@entry=3D0x2212d1a37940) at /usr/home/somers/src/freebsd.org/src/usr.sbin/ctld/uclparse.c:66 #1 0x0000014e7e066079 in uclparse_target (name=3D<optimized out>,=20 top=3D0x2212d1a37240) at /usr/home/somers/src/freebsd.org/src/usr.sbin/ctld/uclparse.c:762 #2 uclparse_toplevel (top=3D0x2212d1a371c0) at /usr/home/somers/src/freebsd.org/src/usr.sbin/ctld/uclparse.c:376 #3 uclparse_conf (newconf=3Dnewconf@entry=3D0x2212d1a320a0,=20 path=3Dpath@entry=3D0x14e7e050b3e "/etc/ctl.conf") at /usr/home/somers/src/freebsd.org/src/usr.sbin/ctld/uclparse.c:1007 #4 0x0000014e7e05b359 in conf_new_from_file ( path=3Dpath@entry=3D0x14e7e050b3e "/etc/ctl.conf", oldconf=3D<optimized= out>,=20 ucl=3Dtrue) at /usr/home/somers/src/freebsd.org/src/usr.sbin/ctld/ctld.= c:2719 #5 0x0000014e7e05a9d8 in main (argc=3D<optimized out>, argv=3D0x1569e17057= 0) at /usr/home/somers/src/freebsd.org/src/usr.sbin/ctld/ctld.c:2804 Steps to Reproduce =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Create a /etc/ctl.conf file like this: auth-group { myag { auth-type =3D none } } portal-group { pg0 { discovery-auth-group myag listen 0.0.0.0 } } lun { example_1 { path =3D "/tmp/luns/lun.1" } } target { "iqn.2012-06.com.example:target1" { portal-group { name =3D pg0 } lun =3D [ { number =3D 1, name =3D example_1 } ] chap =3D [=20 { user =3D "user_1" secret =3D "secret_1" } ] } } Then start ctld like this: # ctld -ut Segmentation fault (core dumped) --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-274380-227>