[Bug 251342] fs/unionfs: VOP_UNSET_TEXT without VOP_SET_TEXT leads to panic

From: <bugzilla-noreply_at_freebsd.org>
Date: Mon, 09 Jan 2023 15:02:08 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=251342

--- Comment #4 from commit-hook@FreeBSD.org ---
A commit in branch stable/13 references this bug:

URL:
https://cgit.FreeBSD.org/src/commit/?id=04f8674aa7486ec2d73d60c2247fe5e33b5399c5

commit 04f8674aa7486ec2d73d60c2247fe5e33b5399c5
Author:     Jason A. Harmening <jah@FreeBSD.org>
AuthorDate: 2021-12-21 23:51:51 +0000
Commit:     Ed Maste <emaste@FreeBSD.org>
CommitDate: 2023-01-09 02:31:15 +0000

    unionfs: implement VOP_SET_TEXT/VOP_UNSET_TEXT

    The implementation simply passes the text ref to the appropriate
    underlying vnode.  Without this, the default [un]set_text
    implementation will only manage the text ref on the unionfs vnode,
    causing it to be out of sync with the underlying filesystems and
    potentially allowing corruption of executable file contents.
    On INVARIANTS kernels, it also readily produces a panic on process
    termination because the VM object representing the executable mapping
    is backed by the underlying vnode, not the unionfs vnode.

    PR:     251342
    Reviewed by:    kib
    Differential Revision: https://reviews.freebsd.org/D33611

    (cherry picked from commit 9e891d43f586e91541bd61fb12550de296d76fd9)

 sys/fs/unionfs/union_vnops.c | 34 ++++++++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

-- 
You are receiving this mail because:
You are the assignee for the bug.