Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 12 Sep 2021 12:14:19 GMT
From:      Guido Falsi <madpilot@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org
Subject:   git: d557edd568b5 - 2021Q3 - emulators/virtualbox-ose-additions: Assign default value to pointer
Message-ID:  <202109121214.18CCEJJG027558@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch 2021Q3 has been updated by madpilot:

URL: https://cgit.FreeBSD.org/ports/commit/?id=d557edd568b5e127b6f8eefad4ba071c3aa123f9

commit d557edd568b5e127b6f8eefad4ba071c3aa123f9
Author:     Martin Ilavsky <ilavsky.martin@gmail.com>
AuthorDate: 2021-09-11 20:38:50 +0000
Commit:     Guido Falsi <madpilot@FreeBSD.org>
CommitDate: 2021-09-12 12:11:53 +0000

    emulators/virtualbox-ose-additions: Assign default value to pointer
    
    In the virtualbox virtual filesystem code we ship as a patch some
    code in an else block is commented out. This produces a code path
    in which a pointer variable is dereferenced in an unassigned state,
    causing random crashes.
    
    Lacking a better fix, give a default value of NULL to the pointer,
    which at least avoids the random pointer dereference issue.
    
    PR:             255386
    (cherry picked from commit 1b2394551c038558810be8bf396462174db334be)
---
 emulators/virtualbox-ose-additions/Makefile                           | 1 +
 .../files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vnops.c   | 4 ++--
 2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/emulators/virtualbox-ose-additions/Makefile b/emulators/virtualbox-ose-additions/Makefile
index 5d5e6dd75c50..f5350e92c5b2 100644
--- a/emulators/virtualbox-ose-additions/Makefile
+++ b/emulators/virtualbox-ose-additions/Makefile
@@ -2,6 +2,7 @@
 
 PORTNAME=	virtualbox-ose
 PORTVERSION=	6.1.22
+PORTREVISION=	1
 CATEGORIES=	emulators
 MASTER_SITES=	https://download.virtualbox.org/virtualbox/${PORTVERSION}/
 PKGNAMESUFFIX?=	-additions
diff --git a/emulators/virtualbox-ose/files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vnops.c b/emulators/virtualbox-ose/files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vnops.c
index 99893d2f750e..904c251395dd 100644
--- a/emulators/virtualbox-ose/files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vnops.c
+++ b/emulators/virtualbox-ose/files/patch-src_VBox_Additions_freebsd_vboxvfs_vboxvfs__vnops.c
@@ -1,4 +1,4 @@
---- src/VBox/Additions/freebsd/vboxvfs/vboxvfs_vnops.c.orig	2021-01-07 15:34:22 UTC
+--- src/VBox/Additions/freebsd/vboxvfs/vboxvfs_vnops.c.orig	2021-07-28 16:16:27 UTC
 +++ src/VBox/Additions/freebsd/vboxvfs/vboxvfs_vnops.c
 @@ -14,228 +14,1350 @@
   * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
@@ -1119,7 +1119,7 @@
 +	struct vnode *vp = ap->a_vp;
 +	struct uio *uio = ap->a_uio;
 +	struct vboxfs_node *dir = VP_TO_VBOXFS_NODE(vp);
-+	struct vboxfs_node *node;
++	struct vboxfs_node *node = NULL;
 +	struct sffs_dirent *dirent = NULL;
 +	sffs_dirents_t *cur_buf;
 +	off_t offset = 0;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202109121214.18CCEJJG027558>