Date: Mon, 27 Jul 2026 22:32:39 +0000 From: Mark Johnston <markj@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: 4d30095e2849 - stable/14 - dtrace: Improve DOF string table validation Message-ID: <6a67dc87.26655.aed2cee@gitrepo.freebsd.org>
index | next in thread | raw e-mail
The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4d30095e28496445761dd65e0b7c37731a61ce25 commit 4d30095e28496445761dd65e0b7c37731a61ce25 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2026-07-06 13:21:24 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2026-07-27 14:05:07 +0000 dtrace: Improve DOF string table validation The check for a nul terminator implicitly assumes that the section size is positive. Make the assumption explicit. Reviewed by: christos MFC after: 2 weeks Sponsored by: CHERI Research Centre Differential Revision: https://reviews.freebsd.org/D57977 (cherry picked from commit b56b601c5ba603031312b9bc7ae895ecb0dcdaec) --- sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c b/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c index aa8716908cb1..ff31d806664b 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c +++ b/sys/cddl/contrib/opensolaris/uts/common/dtrace/dtrace.c @@ -14288,8 +14288,9 @@ dtrace_dof_slurp(dof_hdr_t *dof, dtrace_vstate_t *vstate, cred_t *cr, return (-1); } - if (sec->dofs_type == DOF_SECT_STRTAB && *((char *)daddr + - sec->dofs_offset + sec->dofs_size - 1) != '\0') { + if (sec->dofs_type == DOF_SECT_STRTAB && (sec->dofs_size == 0 || + *((char *)daddr + sec->dofs_offset + sec->dofs_size - 1) != + '\0')) { dtrace_dof_error(dof, "non-terminating string table"); return (-1); }home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a67dc87.26655.aed2cee>
