From owner-freebsd-emulation@FreeBSD.ORG Mon Sep 26 11:07:00 2011 Return-Path: Delivered-To: freebsd-emulation@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E2C61065670 for ; Mon, 26 Sep 2011 11:07:00 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 129588FC14 for ; Mon, 26 Sep 2011 11:07:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id p8QB6xVC088119 for ; Mon, 26 Sep 2011 11:06:59 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id p8QB6xaT088117 for freebsd-emulation@FreeBSD.org; Mon, 26 Sep 2011 11:06:59 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 26 Sep 2011 11:06:59 GMT Message-Id: <201109261106.p8QB6xaT088117@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-emulation@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-emulation@FreeBSD.org X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Sep 2011 11:07:00 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/159646 emulation [linux] [patch] bump Linux version in linuxulator f kern/156691 emulation [vmware] [panic] panic when using hard disks as RAW de o kern/156353 emulation [ibcs2] ibcs2 binaries that execute on 4.x not working o kern/155577 emulation [boot] BTX halted after install. Reboot during install o kern/155040 emulation [linux] [patch] Linux recvfrom doesn't handle proto fa o kern/153990 emulation [hyper-v]: Will not install into Hyper-V on Server 200 o kern/153887 emulation [linux] Linux emulator not understand STB_GNU_UNIQUE b o kern/153243 emulation [ibcs2] Seg fault whne running COFF binary using iBCS2 o kern/151714 emulation [linux] print/acroread9 not usable due to lack of supp a bin/150262 emulation [patch] truss(1) -f doesn't follow descendants of the a kern/150186 emulation [parallels] [panic] Parallels Desktop: CDROM disconnec o ports/148097 emulation [patch] suggested addition to linux_base-* packages to o ports/148096 emulation emulators/linux_base-* can not be built from ports on o kern/147793 emulation [vmware] [panic] cdrom handling, panic, possible race o kern/146237 emulation [linux] Linux binaries not reading directories mounted p kern/144584 emulation [linprocfs][patch] bogus values in linprocfs o ports/142837 emulation [patch] emulators/linux_base-* packages fails to insta o kern/140156 emulation [linux] cdparanoia fails to read drive data f kern/138944 emulation [parallels] [regression] Parallels no longer works in o kern/138880 emulation [linux] munmap segfaults after linux_mmap2 stresstest o ports/135337 emulation [PATCH] emulators/linux_base-f10: incorrect bash usage s kern/133144 emulation [linux] linuxulator 2.6 crashes with nvidias libGL.so. o kern/129169 emulation [linux] [patch] Linux Emulation ENOTCONN error using n o kern/126232 emulation [linux] Linux ioctl TCGETS (0x5401) always fails o kern/86619 emulation [linux] linux emulator interacts oddly with cp a kern/72920 emulation [linux]: path "prefixing" is not done on unix domain s o kern/41543 emulation [patch] [request] easier wine/w23 support o kern/39201 emulation [linux] [patch] ptrace(2) and rfork(RFLINUXTHPN) confu o kern/36952 emulation [patch] [linux] ldd(1) command of linux does not work o kern/11165 emulation [ibcs2] IBCS2 doesn't work correctly with PID_MAX 9999 30 problems total. From owner-freebsd-emulation@FreeBSD.ORG Fri Sep 30 00:47:04 2011 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C97A0106566B for ; Fri, 30 Sep 2011 00:47:04 +0000 (UTC) (envelope-from freebsd@hub.org) Received: from hub.org (hub.org [200.46.204.220]) by mx1.freebsd.org (Postfix) with ESMTP id 0CEEC8FC12 for ; Fri, 30 Sep 2011 00:47:03 +0000 (UTC) Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by hub.org (Postfix) with ESMTP id 00D9D1D33008 for ; Thu, 29 Sep 2011 21:30:01 -0300 (ADT) Received: from hub.org ([200.46.204.220]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 22569-07 for ; Fri, 30 Sep 2011 00:30:00 +0000 (UTC) Received: from [192.168.1.4] (24-246-4-43.cable.teksavvy.com [24.246.4.43]) by hub.org (Postfix) with ESMTPA id 517671D33006 for ; Thu, 29 Sep 2011 21:29:59 -0300 (ADT) From: Hub- FreeBSD Date: Thu, 29 Sep 2011 20:29:57 -0400 Message-Id: To: freebsd-emulation@freebsd.org Mime-Version: 1.0 (Apple Message framework v1244.3) X-Mailer: Apple Mail (2.1244.3) Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: VirtualBox + Bridged Networking X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2011 00:47:04 -0000 First, I've searched google hi+low, and this is still eluding me =85 I've got a FreeBSD 8-STABLE box that is up to date as of yesterday =85 = VirtualBox installed great, I got through the docs on how to create a = Headless VM, it boots, FreeBSD 8 ISO installed on it, everything works = great "stand alone" =85 but I can't get the network to work. Host Machine, ethernet looks like: ganymede# ifconfig -a ale0: flags=3D8843 metric 0 mtu = 1500 = options=3Dc319a ether 00:22:15:f1:bc:c5 inet 192.168.1.2 netmask 0xffffff00 broadcast 192.168.1.255 media: Ethernet 100baseTX status: active pflog0: flags=3D0<> metric 0 mtu 33200 lo0: flags=3D8049 metric 0 mtu 16384 options=3D3 inet 127.0.0.1 netmask 0xff000000=20 vboxnet0: flags=3D8902 metric 0 mtu = 1500 ether 0a:00:27:00:00:00 ganymede#=20 showvminfo for the VM shows NIC 1 as : NIC 1: MAC: 080027F9E7B2, Attachment: Bridged Interface = 'vboxnet0', Cable connected: on, Trace: off (file: none), Type: 82540EM, = Reported speed: 0 Mbps, Boot priority: 0 A cut-n-paste of ifconfig in the VPS is attached below... Yes, I can't ping anywhere =85 I tried to set the bridged device to the ale0 device, which allows me to = ping everywhere *except* the host server =85 so I'm missing a step here = =85=20 I've read through http://wiki.freebsd.org/VirtualBox several times =85=20= The steps i used to create the remote headless were found: http://www.virtualbox.org/manual/ch07.html So I figure either I'm bridging to the wrong device. or I missing a = configuration step on the Host side of things =85 but I can't seem to = find anywhere where someone has asked that and gotten an answer and/or = that it is documented =85 everything seems to point to using the GUI, = which, in this environment, I don' t have access to =85 So far, though, getting VirtualBox up and running has been fantastic ...= From owner-freebsd-emulation@FreeBSD.ORG Fri Sep 30 05:53:07 2011 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ABBF91065675 for ; Fri, 30 Sep 2011 05:53:07 +0000 (UTC) (envelope-from decke@bluelife.at) Received: from groupware.itac.at (groupware.itac.at [91.205.172.99]) by mx1.freebsd.org (Postfix) with ESMTP id 417D28FC12 for ; Fri, 30 Sep 2011 05:53:06 +0000 (UTC) Received: from home.bluelife.at (93.104.210.95) by groupware.itac.at (Axigen) with (AES256-SHA encrypted) ESMTPSA id 13671A; Fri, 30 Sep 2011 07:53:21 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Date: Fri, 30 Sep 2011 07:53:06 +0200 From: Bernhard Froehlich To: Hub- FreeBSD In-Reply-To: References: Message-ID: X-Sender: decke@bluelife.at User-Agent: Roundcube Webmail/0.5.4 X-AxigenSpam-Level: 1 X-CTCH-RefID: str=0001.0A0B0204.4E855941.009C,ss=1,fgs=0 X-CTCH-VOD: Unknown X-CTCH-Spam: Unknown Cc: freebsd-emulation@freebsd.org Subject: Re: VirtualBox + Bridged Networking X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2011 05:53:07 -0000 On Thu, 29 Sep 2011 20:29:57 -0400, Hub- FreeBSD wrote: > First, I've searched google hi+low, and this is still eluding me … > > I've got a FreeBSD 8-STABLE box that is up to date as of yesterday … > VirtualBox installed great, I got through the docs on how to create a > Headless VM, it boots, FreeBSD 8 ISO installed on it, everything works > great "stand alone" … but I can't get the network to work. > > Host Machine, ethernet looks like: > > ganymede# ifconfig -a > ale0: flags=8843 metric 0 mtu 1500 > options=c319a > ether 00:22:15:f1:bc:c5 > inet 192.168.1.2 netmask 0xffffff00 broadcast 192.168.1.255 > media: Ethernet 100baseTX > status: active > pflog0: flags=0<> metric 0 mtu 33200 > lo0: flags=8049 metric 0 mtu 16384 > options=3 > inet 127.0.0.1 netmask 0xff000000 > vboxnet0: flags=8902 metric 0 mtu 1500 > ether 0a:00:27:00:00:00 > ganymede# > > > showvminfo for the VM shows NIC 1 as : > > NIC 1: MAC: 080027F9E7B2, Attachment: Bridged Interface > 'vboxnet0', Cable connected: on, Trace: off (file: none), Type: > 82540EM, Reported speed: 0 Mbps, Boot priority: 0 > > A cut-n-paste of ifconfig in the VPS is attached below... > > > > Yes, I can't ping anywhere … > > I tried to set the bridged device to the ale0 device, which allows me > to ping everywhere *except* the host server … so I'm missing a step > here … > > I've read through http://wiki.freebsd.org/VirtualBox several times … > > The steps i used to create the remote headless were found: > > http://www.virtualbox.org/manual/ch07.html > > So I figure either I'm bridging to the wrong device. or I missing a > configuration step on the Host side of things … but I can't seem to > find anywhere where someone has asked that and gotten an answer and/or > that it is documented … everything seems to point to using the GUI, > which, in this environment, I don' t have access to … > > > So far, though, getting VirtualBox up and running has been fantastic I guess you just used the wrong device that you attached to. When configuring bridging via QT GUI and using bge0 I get: NIC 1: MAC: 080027289A85, Attachment: Bridged Interface 'bge0', Cable connected: on, Trace: off (file: none), Type: 82540EM, Reported speed: 0 Mbps, Boot priority: 0 -- Bernhard Fröhlich http://www.bluelife.at/ From owner-freebsd-emulation@FreeBSD.ORG Fri Sep 30 10:36:58 2011 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1DC73106564A for ; Fri, 30 Sep 2011 10:36:58 +0000 (UTC) (envelope-from bounces+73574-a79e-freebsd-emulation=freebsd.org@sendgrid.info) Received: from o3.sendgrid.info (o3.sendgrid.info [67.228.50.51]) by mx1.freebsd.org (Postfix) with SMTP id CF1A08FC14 for ; Fri, 30 Sep 2011 10:36:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sendgrid.info; h= message-id:date:from:reply-to:mime-version:to:subject :content-type:content-transfer-encoding; s=smtpapi; bh=z0gUR7Tu9 4rQFZBeJSM06HEL04Q=; b=RJcmyaWuprHEPdr4sea8/mn1ZZvIrtLxRBRLZm3uj 85CpEwqlLa0R0jJfD3mD/KJmpL2Q0J8k0v+YkmMOZ2sbJRIAIvO1hMXchw05210Y bzBqj/OHSXSeMRle+ZelJxfH/NwZkwkBtc93nlw76xMxZ6lzBXdp3IMfqnsZHIxe rg= Received: by 10.16.69.124 with SMTP id mf30.2069.4E8577806 Fri, 30 Sep 2011 03:02:08 -0500 (CDT) Received: from mail.tarsnap.com (unknown [10.9.180.5]) by mi9 (SG) with ESMTP id 4e857780.1ee2.a4cfc6d for ; Fri, 30 Sep 2011 03:02:08 -0500 (CST) Received: (qmail 76786 invoked from network); 30 Sep 2011 08:00:32 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by mail.tarsnap.com with ESMTP; 30 Sep 2011 08:00:32 -0000 Received: (qmail 31026 invoked from network); 30 Sep 2011 08:00:25 -0000 Received: from unknown (HELO clamshell.daemonology.net) (127.0.0.1) by clamshell.daemonology.net with SMTP; 30 Sep 2011 08:00:25 -0000 Message-ID: <4E857719.7060306@freebsd.org> Date: Fri, 30 Sep 2011 01:00:25 -0700 From: FreeBSD Security Officer Organization: FreeBSD Project User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:6.0.2) Gecko/20110914 Thunderbird/6.0.2 MIME-Version: 1.0 To: freebsd-security@freebsd.org, freebsd-emulation@freebsd.org X-Enigmail-Version: undefined Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Sendgrid-EID: GsaYt/HgnT3LFeBgDPK24CllxjM/ElJ4940U1BqFk4XQanKCkCCpyO/EdGCuK/YJtKSo2ijgnfUbqpEniGzlRzbAnkUbVSvKfadUuIrCURrW6eylrvyRP0LqDnfrLesZmJnZ0QhmT0eY+TAvbneAFp8eQBmVPBB/tRjIsRKnnJg= Cc: Subject: HEADS UP: breakage with linux emulation + SA-11:05.unix X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: security-officer@freebsd.org List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2011 10:36:58 -0000 Hi all, It appears that the security fix in SA-11:05.unix exposed a bug in the linux emulation code: Linux has a different size of sockaddr_un than FreeBSD, and the linux emulation code was passing socket addresses through without doing any translation first. This appears to break all X-using Linux code -- both applications and plugins such as the widely-used flash plugin -- and probably other Linux applications too. I am working on a fix for this and will send an updated advisory out as soon as it's ready. -- Colin Percival Security Officer, FreeBSD | freebsd.org | The power to serve Founder / author, Tarsnap | tarsnap.com | Online backups for the truly paranoid From owner-freebsd-emulation@FreeBSD.ORG Fri Sep 30 14:08:44 2011 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 945491065673 for ; Fri, 30 Sep 2011 14:08:44 +0000 (UTC) (envelope-from freebsd@hub.org) Received: from hub.org (hub.org [200.46.204.220]) by mx1.freebsd.org (Postfix) with ESMTP id 312238FC12 for ; Fri, 30 Sep 2011 14:08:43 +0000 (UTC) Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by hub.org (Postfix) with ESMTP id CF6801D33003; Fri, 30 Sep 2011 11:08:40 -0300 (ADT) Received: from hub.org ([200.46.204.220]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 06380-01; Fri, 30 Sep 2011 14:08:40 +0000 (UTC) Received: from [192.168.1.4] (24-246-4-43.cable.teksavvy.com [24.246.4.43]) by hub.org (Postfix) with ESMTPA id 1C8B91D33000; Fri, 30 Sep 2011 11:08:39 -0300 (ADT) Mime-Version: 1.0 (Apple Message framework v1244.3) Content-Type: text/plain; charset=windows-1252 From: Hub- FreeBSD In-Reply-To: Date: Fri, 30 Sep 2011 10:08:40 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Bernhard Froehlich X-Mailer: Apple Mail (2.1244.3) Cc: freebsd-emulation@freebsd.org Subject: Re: VirtualBox + Bridged Networking X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2011 14:08:44 -0000 'k, don't know what I did the first time, but seemed to work fine this = time =85 thx =85 On 2011-09-30, at 1:53 AM, Bernhard Froehlich wrote: > On Thu, 29 Sep 2011 20:29:57 -0400, Hub- FreeBSD wrote: >> First, I've searched google hi+low, and this is still eluding me =85 >>=20 >> I've got a FreeBSD 8-STABLE box that is up to date as of yesterday =85= >> VirtualBox installed great, I got through the docs on how to create a >> Headless VM, it boots, FreeBSD 8 ISO installed on it, everything = works >> great "stand alone" =85 but I can't get the network to work. >>=20 >> Host Machine, ethernet looks like: >>=20 >> ganymede# ifconfig -a >> ale0: flags=3D8843 metric 0 = mtu 1500 >> = options=3Dc319a >> ether 00:22:15:f1:bc:c5 >> inet 192.168.1.2 netmask 0xffffff00 broadcast 192.168.1.255 >> media: Ethernet 100baseTX >> status: active >> pflog0: flags=3D0<> metric 0 mtu 33200 >> lo0: flags=3D8049 metric 0 mtu 16384 >> options=3D3 >> inet 127.0.0.1 netmask 0xff000000=20 >> vboxnet0: flags=3D8902 metric 0 = mtu 1500 >> ether 0a:00:27:00:00:00 >> ganymede#=20 >>=20 >>=20 >> showvminfo for the VM shows NIC 1 as : >>=20 >> NIC 1: MAC: 080027F9E7B2, Attachment: Bridged Interface >> 'vboxnet0', Cable connected: on, Trace: off (file: none), Type: >> 82540EM, Reported speed: 0 Mbps, Boot priority: 0 >>=20 >> A cut-n-paste of ifconfig in the VPS is attached below... >>=20 >>=20 >>=20 >> Yes, I can't ping anywhere =85 >>=20 >> I tried to set the bridged device to the ale0 device, which allows me >> to ping everywhere *except* the host server =85 so I'm missing a step >> here =85 >>=20 >> I've read through http://wiki.freebsd.org/VirtualBox several times =85=20= >>=20 >> The steps i used to create the remote headless were found: >>=20 >> http://www.virtualbox.org/manual/ch07.html >>=20 >> So I figure either I'm bridging to the wrong device. or I missing a >> configuration step on the Host side of things =85 but I can't seem to >> find anywhere where someone has asked that and gotten an answer = and/or >> that it is documented =85 everything seems to point to using the GUI, >> which, in this environment, I don' t have access to =85 >>=20 >>=20 >> So far, though, getting VirtualBox up and running has been fantastic >=20 > I guess you just used the wrong device that you attached to. When > configuring bridging via QT GUI and using bge0 I get: >=20 > NIC 1: MAC: 080027289A85, Attachment: Bridged Interface > 'bge0', Cable connected: on, Trace: off (file: none), Type: 82540EM, > Reported speed: 0 Mbps, Boot priority: 0 >=20 >=20 > --=20 > Bernhard Fr=F6hlich > http://www.bluelife.at/ > _______________________________________________ > freebsd-emulation@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-emulation > To unsubscribe, send any mail to = "freebsd-emulation-unsubscribe@freebsd.org" From owner-freebsd-emulation@FreeBSD.ORG Fri Sep 30 14:53:53 2011 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D5A6D106566C; Fri, 30 Sep 2011 14:53:53 +0000 (UTC) (envelope-from dmk@ncf.ca) Received: from mail.ncf.ca (mail.ncf.ca [134.117.136.45]) by mx1.freebsd.org (Postfix) with ESMTP id B1B138FC23; Fri, 30 Sep 2011 14:53:53 +0000 (UTC) Received: from adminpc5.internal.iinfraxu.ca (CPE0014bfb32f8a-CM0014e887dd48.cpe.net.cable.rogers.com [174.114.186.180]) (Authenticated sender: du880@ncf.ca) by mail.ncf.ca (Postfix) with ESMTP id 85D7693F02; Fri, 30 Sep 2011 10:20:52 -0400 (EDT) From: Dwayne MacKinnon To: freebsd-emulation@freebsd.org Date: Fri, 30 Sep 2011 10:20:50 -0400 User-Agent: KMail/1.13.7 (FreeBSD/8.2-RELEASE-p2; KDE/4.6.5; i386; ; ) MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <201109301020.51042.dmk@ncf.ca> Cc: freebsd-amd64@freebsd.org Subject: Odd x.org problem with amd64 and linux emulation X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2011 14:53:53 -0000 Hi all, Forgive the cross-post... the problem seemed quite applicable to both. I recently received a new Dell OptiPlex 390, and decided to put FreeBSD amd64 on it. Everything's working ok, as it is a work computer and the fact that I have no 2d or 3d acceleration doesn't matter. I've run into an odd problem though. When I try to start up acroread9, It complains that it can't open DISPLAY :0. If I set the DISPLAY environment variable to localhost:0, it opens just fine. I installed linux- firefox and it displayed the same behaviour. My i386 box does not have this problem. DISPLAY is set to :0 and acroread opens just fine. Any ideas? Or am I just going to have to set up my .kde4/env directory to set DISPLAY to localhost:0? I'm running a recent (Sept 28th) 8-STABLE amd64 with an up to date ports tree. I would appreciate a cc as I am not subscribed to either of these lists. Cheers, DMK From owner-freebsd-emulation@FreeBSD.ORG Fri Sep 30 15:26:43 2011 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5D808106564A for ; Fri, 30 Sep 2011 15:26:43 +0000 (UTC) (envelope-from sales@hub.org) Received: from hub.org (hub.org [200.46.204.220]) by mx1.freebsd.org (Postfix) with ESMTP id 073618FC0A for ; Fri, 30 Sep 2011 15:26:42 +0000 (UTC) Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by hub.org (Postfix) with ESMTP id 900C81D33002 for ; Fri, 30 Sep 2011 12:09:43 -0300 (ADT) Received: from hub.org ([200.46.204.220]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 14032-04 for ; Fri, 30 Sep 2011 15:09:43 +0000 (UTC) Received: from [192.168.1.4] (24-246-4-43.cable.teksavvy.com [24.246.4.43]) by hub.org (Postfix) with ESMTPA id 1C2AC1D33001 for ; Fri, 30 Sep 2011 12:09:42 -0300 (ADT) From: Sales Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Date: Fri, 30 Sep 2011 11:09:41 -0400 Message-Id: To: freebsd-emulation@freebsd.org Mime-Version: 1.0 (Apple Message framework v1244.3) X-Mailer: Apple Mail (2.1244.3) Subject: =?windows-1252?q?VirtualBox=3A_64bit_FreeBSD_guest_on_64bit_Free?= =?windows-1252?q?BSD_host_=85_=22Long_Mode=22=3F?= X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2011 15:26:43 -0000 Okay, did find t he following, but it was from '09 ... https://forums.virtualbox.org/viewtopic.php?f=3D8&t=3D19420 I just tried to install 8.2/64bit on my 7-STABLE 64bit server =85 error = comes up as 'CPU doesn't support long mode' =85 the above link indicates = that this is because my CPUs don't support some features, but, my system = is only a year old =85=20 dmesg shows my CPU as: CPU: Intel(R) Xeon(R) CPU E5420 @ 2.50GHz (2500.10-MHz = K8-class CPU) Origin =3D "GenuineIntel" Id =3D 0x1067a Family =3D 6 Model =3D 17 = Stepping =3D 10 = Features=3D0xbfebfbff = Features2=3D0x40ce3bd AMD Features=3D0x20100800 AMD Features2=3D0x1 TSC: P-state invariant Cores per package: 4 And according to Intel's site, it does support VT-x: = http://ark.intel.com/products/33927/Intel-Xeon-Processor-E5420-%2812M-Cach= e-2_50-GHz-1333-MHz-FSB%29 So, this is something else altogether =85 ? =20 Thx From owner-freebsd-emulation@FreeBSD.ORG Fri Sep 30 15:41:41 2011 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76F50106564A; Fri, 30 Sep 2011 15:41:41 +0000 (UTC) (envelope-from gpalmer@freebsd.org) Received: from noop.in-addr.com (mail.in-addr.com [IPv6:2001:470:8:162::1]) by mx1.freebsd.org (Postfix) with ESMTP id 4BF1F8FC08; Fri, 30 Sep 2011 15:41:41 +0000 (UTC) Received: from gjp by noop.in-addr.com with local (Exim 4.76 (FreeBSD)) (envelope-from ) id 1R9fDY-0009MS-B1; Fri, 30 Sep 2011 11:41:40 -0400 Date: Fri, 30 Sep 2011 11:41:40 -0400 From: Gary Palmer To: Dwayne MacKinnon Message-ID: <20110930154140.GA88465@in-addr.com> References: <201109301020.51042.dmk@ncf.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201109301020.51042.dmk@ncf.ca> X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: gpalmer@freebsd.org X-SA-Exim-Scanned: No (on noop.in-addr.com); SAEximRunCond expanded to false Cc: freebsd-emulation@freebsd.org, freebsd-amd64@freebsd.org Subject: Re: Odd x.org problem with amd64 and linux emulation X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2011 15:41:41 -0000 On Fri, Sep 30, 2011 at 10:20:50AM -0400, Dwayne MacKinnon wrote: > Hi all, > > Forgive the cross-post... the problem seemed quite applicable to > both. I recently received a new Dell OptiPlex 390, and decided to put > FreeBSD amd64 on it. Everything's working ok, as it is a work computer > and the fact that I have no 2d or 3d acceleration doesn't matter. > > I've run into an odd problem though. When I try to start up acroread9, > It complains that it can't open DISPLAY :0. If I set the DISPLAY > environment variable to localhost:0, it opens just fine. I installed linux- > firefox and it displayed the same behaviour. > > My i386 box does not have this problem. DISPLAY is set to :0 and > acroread opens just fine. > > Any ideas? Or am I just going to have to set up my .kde4/env directory > to set DISPLAY to localhost:0? > > I'm running a recent (Sept 28th) 8-STABLE amd64 with an up to date > ports tree. > > I would appreciate a cc as I am not subscribed to either of these lists. This may be relevant: http://lists.freebsd.org/pipermail/freebsd-security/2011-September/006042.html Regards, Gary From owner-freebsd-emulation@FreeBSD.ORG Fri Sep 30 16:18:47 2011 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 28BFA1065670; Fri, 30 Sep 2011 16:18:47 +0000 (UTC) (envelope-from dmk@ncf.ca) Received: from mail.ncf.ca (mail.ncf.ca [134.117.136.45]) by mx1.freebsd.org (Postfix) with ESMTP id F0BA88FC08; Fri, 30 Sep 2011 16:18:46 +0000 (UTC) Received: from adminpc5.internal.iinfraxu.ca (CPE0014bfb32f8a-CM0014e887dd48.cpe.net.cable.rogers.com [174.114.186.180]) (Authenticated sender: du880@ncf.ca) by mail.ncf.ca (Postfix) with ESMTP id 9DD368DF6A; Fri, 30 Sep 2011 12:18:46 -0400 (EDT) From: Dwayne MacKinnon To: Gary Palmer Date: Fri, 30 Sep 2011 12:18:45 -0400 User-Agent: KMail/1.13.7 (FreeBSD/8.2-RELEASE-p2; KDE/4.6.5; i386; ; ) References: <201109301020.51042.dmk@ncf.ca> <20110930154140.GA88465@in-addr.com> In-Reply-To: <20110930154140.GA88465@in-addr.com> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201109301218.45704.dmk@ncf.ca> Cc: freebsd-emulation@freebsd.org, freebsd-amd64@freebsd.org Subject: Re: Odd x.org problem with amd64 and linux emulation X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2011 16:18:47 -0000 On September 30, 2011 11:41:40 AM Gary Palmer wrote: > On Fri, Sep 30, 2011 at 10:20:50AM -0400, Dwayne MacKinnon wrote: > > Hi all, > > > > Forgive the cross-post... the problem seemed quite applicable to > > both. I recently received a new Dell OptiPlex 390, and decided to put > > FreeBSD amd64 on it. Everything's working ok, as it is a work computer > > and the fact that I have no 2d or 3d acceleration doesn't matter. > > > > I've run into an odd problem though. When I try to start up acroread9, > > It complains that it can't open DISPLAY :0. If I set the DISPLAY > > environment variable to localhost:0, it opens just fine. I installed > > linux- firefox and it displayed the same behaviour. > > > > My i386 box does not have this problem. DISPLAY is set to :0 and > > acroread opens just fine. > > > > Any ideas? Or am I just going to have to set up my .kde4/env directory > > to set DISPLAY to localhost:0? > > > > I'm running a recent (Sept 28th) 8-STABLE amd64 with an up to date > > ports tree. > > > > I would appreciate a cc as I am not subscribed to either of these lists. > > This may be relevant: > > http://lists.freebsd.org/pipermail/freebsd-security/2011- September/006042.h > tml > > Regards, > > Gary That seems quite likely. I will keep on with my workaround and keep an eye on the list archives. Thanks everyone. Cheers, DMK From owner-freebsd-emulation@FreeBSD.ORG Fri Sep 30 16:57:54 2011 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 936B11065670 for ; Fri, 30 Sep 2011 16:57:54 +0000 (UTC) (envelope-from freebsd@hub.org) Received: from hub.org (hub.org [200.46.204.220]) by mx1.freebsd.org (Postfix) with ESMTP id 55D3C8FC12 for ; Fri, 30 Sep 2011 16:57:54 +0000 (UTC) Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by hub.org (Postfix) with ESMTP id D9CA11D33006 for ; Fri, 30 Sep 2011 13:57:52 -0300 (ADT) Received: from hub.org ([200.46.204.220]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 75932-06 for ; Fri, 30 Sep 2011 16:57:52 +0000 (UTC) Received: from [192.168.1.4] (24-246-4-43.cable.teksavvy.com [24.246.4.43]) by hub.org (Postfix) with ESMTPA id 5AEFA1D33003 for ; Fri, 30 Sep 2011 13:57:52 -0300 (ADT) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Apple Message framework v1244.3) From: Hub- FreeBSD In-Reply-To: Date: Fri, 30 Sep 2011 12:57:50 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: <87FBE966-B70F-48F2-9771-796DA8D3032D@hub.org> References: To: freebsd-emulation@freebsd.org X-Mailer: Apple Mail (2.1244.3) Subject: =?windows-1252?q?Re=3A_VirtualBox=3A_64bit_FreeBSD_guest_on_64bi?= =?windows-1252?q?t_FreeBSD_host_=85_=22Long_Mode=22=3F?= X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2011 16:57:54 -0000 Tried it with a Centos 6.0 guest also =85 similar error, but more = explicitly telling me I'm not using a 64bit processor =85 "This kernel requires an x86-64 CPU, but only detected an i686 CPU" On 2011-09-30, at 11:09 AM, Sales wrote: >=20 > Okay, did find t he following, but it was from '09 ... >=20 > https://forums.virtualbox.org/viewtopic.php?f=3D8&t=3D19420 >=20 > I just tried to install 8.2/64bit on my 7-STABLE 64bit server =85 = error comes up as 'CPU doesn't support long mode' =85 the above link = indicates that this is because my CPUs don't support some features, but, = my system is only a year old =85=20 >=20 > dmesg shows my CPU as: >=20 > CPU: Intel(R) Xeon(R) CPU E5420 @ 2.50GHz (2500.10-MHz = K8-class CPU) > Origin =3D "GenuineIntel" Id =3D 0x1067a Family =3D 6 Model =3D 17 = Stepping =3D 10 > = Features=3D0xbfebfbff > = Features2=3D0x40ce3bd > AMD Features=3D0x20100800 > AMD Features2=3D0x1 > TSC: P-state invariant > Cores per package: 4 >=20 >=20 > And according to Intel's site, it does support VT-x: >=20 > = http://ark.intel.com/products/33927/Intel-Xeon-Processor-E5420-%2812M-Cach= e-2_50-GHz-1333-MHz-FSB%29 >=20 > So, this is something else altogether =85 ? =20 >=20 > Thx >=20 >=20 From owner-freebsd-emulation@FreeBSD.ORG Fri Sep 30 17:43:12 2011 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 988FA106566C for ; Fri, 30 Sep 2011 17:43:12 +0000 (UTC) (envelope-from amvandemore@gmail.com) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 268D18FC13 for ; Fri, 30 Sep 2011 17:43:11 +0000 (UTC) Received: by fxg9 with SMTP id 9so4196877fxg.13 for ; Fri, 30 Sep 2011 10:43:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Nt3u4Wb9gGDRJGVCKE/NMI49Kor8iawK8dbijJf2d+M=; b=xYLRTPL08NmPGG1aS24l2ahkSFH3B8yE3xAdLk4oYjN3kZIZXwfi4k8Vdn1zWdGDR5 vUB94V2uMwzolMSx5gTtD6aLI7bRoX7i8fm0I7zeCKYRCsHHv3LdUD/OY3IaHm/C1y53 66twnKWBEoK64x2CPLjo6Sy9a3N0XeHfur5F0= MIME-Version: 1.0 Received: by 10.223.55.83 with SMTP id t19mr11904116fag.50.1317403166193; Fri, 30 Sep 2011 10:19:26 -0700 (PDT) Received: by 10.223.124.197 with HTTP; Fri, 30 Sep 2011 10:19:26 -0700 (PDT) In-Reply-To: <87FBE966-B70F-48F2-9771-796DA8D3032D@hub.org> References: <87FBE966-B70F-48F2-9771-796DA8D3032D@hub.org> Date: Fri, 30 Sep 2011 12:19:26 -0500 Message-ID: From: Adam Vande More To: Hub- FreeBSD Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-emulation@freebsd.org Subject: =?windows-1252?q?Re=3A_VirtualBox=3A_64bit_FreeBSD_guest_on_64bi?= =?windows-1252?q?t_FreeBSD_host_=85_=22Long_Mode=22=3F?= X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2011 17:43:12 -0000 2011/9/30 Hub- FreeBSD > > Tried it with a Centos 6.0 guest also =85 similar error, but more explici= tly > telling me I'm not using a 64bit processor =85 > > "This kernel requires an x86-64 CPU, but only detected an i686 CPU" > > You have to set the VM to 64 bit mode. --=20 Adam Vande More From owner-freebsd-emulation@FreeBSD.ORG Fri Sep 30 18:06:08 2011 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ED0F7106564A for ; Fri, 30 Sep 2011 18:06:08 +0000 (UTC) (envelope-from freebsd@hub.org) Received: from hub.org (hub.org [200.46.204.220]) by mx1.freebsd.org (Postfix) with ESMTP id ADF618FC17 for ; Fri, 30 Sep 2011 18:06:08 +0000 (UTC) Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by hub.org (Postfix) with ESMTP id 4290A1D33003; Fri, 30 Sep 2011 15:06:07 -0300 (ADT) Received: from hub.org ([200.46.204.220]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 84666-06; Fri, 30 Sep 2011 18:06:06 +0000 (UTC) Received: from [192.168.1.4] (24-246-4-43.cable.teksavvy.com [24.246.4.43]) by hub.org (Postfix) with ESMTPA id A2B5A1D33002; Fri, 30 Sep 2011 15:06:05 -0300 (ADT) Mime-Version: 1.0 (Apple Message framework v1244.3) From: Hub- FreeBSD In-Reply-To: Date: Fri, 30 Sep 2011 14:06:04 -0400 Message-Id: <156697DC-0D33-46A8-A719-096EED0EE699@hub.org> References: <87FBE966-B70F-48F2-9771-796DA8D3032D@hub.org> To: Adam Vande More X-Mailer: Apple Mail (2.1244.3) Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-emulation@freebsd.org Subject: =?windows-1252?q?Re=3A_VirtualBox=3A_64bit_FreeBSD_guest_on_64bi?= =?windows-1252?q?t_FreeBSD_host_=85_=22Long_Mode=22=3F?= X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2011 18:06:09 -0000 'k, I assumed that was what happened when I set "--ostype FreeBSD_64" =85 = I take it there is another switch I need to use? I did a search on the VBoxManage page, and all I can find '64' related = is "--firmware efi64" .. but no explanation of exactly what that is, = other then "Use EFI only if your fully understand what you're doing." =85 On 2011-09-30, at 1:19 PM, Adam Vande More wrote: > 2011/9/30 Hub- FreeBSD >=20 > Tried it with a Centos 6.0 guest also =85 similar error, but more = explicitly telling me I'm not using a 64bit processor =85 >=20 > "This kernel requires an x86-64 CPU, but only detected an i686 CPU" >=20 >=20 > You have to set the VM to 64 bit mode. >=20 > --=20 > Adam Vande More From owner-freebsd-emulation@FreeBSD.ORG Fri Sep 30 22:03:11 2011 Return-Path: Delivered-To: freebsd-emulation@FreeBSD.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 4B474106566B; Fri, 30 Sep 2011 22:03:10 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: freebsd-emulation@FreeBSD.org, security-officer@freebsd.org Date: Fri, 30 Sep 2011 18:02:56 -0400 User-Agent: KMail/1.6.2 References: <4E857719.7060306@freebsd.org> In-Reply-To: <4E857719.7060306@freebsd.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: Multipart/Mixed; boundary="Boundary-00=_UyjhOe0Sia/n4Wb" Message-Id: <201109301803.01010.jkim@FreeBSD.org> Cc: Subject: Re: HEADS UP: breakage with linux emulation + SA-11:05.unix X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2011 22:03:11 -0000 --Boundary-00=_UyjhOe0Sia/n4Wb Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline [Removed freebsd-security@] On Friday 30 September 2011 04:00 am, FreeBSD Security Officer wrote: > Hi all, > > It appears that the security fix in SA-11:05.unix exposed a bug in > the linux emulation code: Linux has a different size of sockaddr_un > than FreeBSD, and the linux emulation code was passing socket > addresses through without doing any translation first. > > This appears to break all X-using Linux code -- both applications > and plugins such as the widely-used flash plugin -- and probably > other Linux applications too. > > I am working on a fix for this and will send an updated advisory > out as soon as it's ready. For the impatient, I have written *unofficial* patch for this Linuxulator regression. Please note that I am posting this patch to this ML only because I wanted to point out Linuxulator is actually missing very important feature, i.e., anonymous Unix domain socket. Jung-uk Kim --Boundary-00=_UyjhOe0Sia/n4Wb Content-Type: text/plain; charset="iso-8859-1"; name="linux_socket.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="linux_socket.diff" Index: sys/compat/linux/linux_socket.c =================================================================== --- sys/compat/linux/linux_socket.c (revision 225884) +++ sys/compat/linux/linux_socket.c (working copy) @@ -96,14 +96,13 @@ static int do_sa_get(struct sockaddr **sap, const struct osockaddr *osa, int *osalen, struct malloc_type *mtype) { - int error=0, bdom; struct sockaddr *sa; struct osockaddr *kosa; - int alloclen; #ifdef INET6 + struct sockaddr_in6 *sin6; int oldv6size; - struct sockaddr_in6 *sin6; #endif + int alloclen, bdom, error, pathlen; if (*osalen < 2 || *osalen > UCHAR_MAX || !osa) return (EINVAL); @@ -133,6 +132,15 @@ do_sa_get(struct sockaddr **sap, const struct osoc goto out; } + if (bdom == AF_LOCAL) { + pathlen = sizeof(struct sockaddr_un) - + offsetof(struct sockaddr_un, sun_path); + alloclen = strnlen(kosa->sa_data, pathlen); + if (alloclen >= pathlen) + log(LOG_DEBUG, "long sockaddr_un truncated\n"); + alloclen += sizeof(struct sockaddr_un) - pathlen; + } + #ifdef INET6 /* * Older Linux IPv6 code uses obsolete RFC2133 struct sockaddr_in6, @@ -696,6 +704,7 @@ static int linux_bind(struct thread *td, struct linux_bind_args *args) { struct sockaddr *sa; + size_t pathlen; int error; error = linux_getsockaddr(&sa, PTRIN(args->name), @@ -703,6 +712,17 @@ linux_bind(struct thread *td, struct linux_bind_ar if (error) return (error); + /* + * XXX Anonymous Unix domain socket not supported. + */ + if (sa->sa_family == AF_LOCAL) { + pathlen = sa->sa_len - offsetof(struct sockaddr_un, sun_path); + if (pathlen <= 0) { + free(sa, M_SONAME); + return (0); + } + } + error = kern_bind(td, args->s, sa); free(sa, M_SONAME); if (error == EADDRNOTAVAIL && args->namelen != sizeof(struct sockaddr_in)) @@ -722,6 +742,7 @@ linux_connect(struct thread *td, struct linux_conn { struct socket *so; struct sockaddr *sa; + size_t pathlen; u_int fflag; int error; @@ -730,6 +751,17 @@ linux_connect(struct thread *td, struct linux_conn if (error) return (error); + /* + * XXX Anonymous Unix domain socket not supported. + */ + if (sa->sa_family == AF_LOCAL) { + pathlen = sa->sa_len - offsetof(struct sockaddr_un, sun_path); + if (pathlen <= 0) { + free(sa, M_SONAME); + return (ENOENT); + } + } + error = kern_connect(td, args->s, sa); free(sa, M_SONAME); if (error != EISCONN) Index: sys/conf/files =================================================================== --- sys/conf/files (revision 225884) +++ sys/conf/files (working copy) @@ -2548,6 +2548,7 @@ libkern/strlcpy.c standard libkern/strlen.c standard libkern/strncmp.c standard libkern/strncpy.c standard +libkern/strnlen.c standard libkern/strsep.c standard libkern/strspn.c standard libkern/strstr.c standard Index: sys/libkern/strnlen.c =================================================================== --- sys/libkern/strnlen.c (revision 225884) +++ sys/libkern/strnlen.c (working copy) @@ -0,0 +1,42 @@ +/*- + * Copyright (c) 2009 David Schultz + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include + +size_t +strnlen(const char *s, size_t maxlen) +{ + size_t len; + + for (len = 0; len < maxlen; len++, s++) { + if (!*s) + break; + } + return (len); +} Index: sys/sys/libkern.h =================================================================== --- sys/sys/libkern.h (revision 225884) +++ sys/sys/libkern.h (working copy) @@ -116,6 +116,7 @@ size_t strlen(const char *); int strncasecmp(const char *, const char *, size_t); int strncmp(const char *, const char *, size_t); char *strncpy(char * __restrict, const char * __restrict, size_t); +size_t strnlen(const char *, size_t); char *strsep(char **, const char *delim); size_t strspn(const char *, const char *); char *strstr(const char *, const char *); --Boundary-00=_UyjhOe0Sia/n4Wb-- From owner-freebsd-emulation@FreeBSD.ORG Fri Sep 30 23:02:52 2011 Return-Path: Delivered-To: freebsd-emulation@FreeBSD.org Received: from [127.0.0.1] (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by hub.freebsd.org (Postfix) with ESMTP id 7CC861065674; Fri, 30 Sep 2011 23:02:52 +0000 (UTC) (envelope-from jkim@FreeBSD.org) From: Jung-uk Kim To: freebsd-emulation@FreeBSD.org Date: Fri, 30 Sep 2011 19:02:41 -0400 User-Agent: KMail/1.6.2 References: <4E857719.7060306@freebsd.org> <201109301803.01010.jkim@FreeBSD.org> In-Reply-To: <201109301803.01010.jkim@FreeBSD.org> MIME-Version: 1.0 Content-Disposition: inline Content-Type: Multipart/Mixed; boundary="Boundary-00=_UqkhOqNyGfbBJVR" Message-Id: <201109301902.44281.jkim@FreeBSD.org> Cc: security-officer@freebsd.org Subject: Re: HEADS UP: breakage with linux emulation + SA-11:05.unix X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2011 23:02:52 -0000 --Boundary-00=_UqkhOqNyGfbBJVR Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline On Friday 30 September 2011 06:02 pm, Jung-uk Kim wrote: > [Removed freebsd-security@] > > On Friday 30 September 2011 04:00 am, FreeBSD Security Officer wrote: > > Hi all, > > > > It appears that the security fix in SA-11:05.unix exposed a bug > > in the linux emulation code: Linux has a different size of > > sockaddr_un than FreeBSD, and the linux emulation code was > > passing socket addresses through without doing any translation > > first. > > > > This appears to break all X-using Linux code -- both applications > > and plugins such as the widely-used flash plugin -- and probably > > other Linux applications too. > > > > I am working on a fix for this and will send an updated advisory > > out as soon as it's ready. > > For the impatient, I have written *unofficial* patch for this > Linuxulator regression. > > Please note that I am posting this patch to this ML only because I > wanted to point out Linuxulator is actually missing very important > feature, i.e., anonymous Unix domain socket. I have updated the patch. It should be slightly more safer than the previous version. This patch is also available from here: http://people.freebsd.org/~jkim/linux_socket.diff Please note this is an *unofficial* fix. Jung-uk Kim --Boundary-00=_UqkhOqNyGfbBJVR Content-Type: text/plain; charset="iso-8859-1"; name="linux_socket.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="linux_socket.diff" Index: sys/compat/linux/linux_socket.c =================================================================== --- sys/compat/linux/linux_socket.c (revision 225884) +++ sys/compat/linux/linux_socket.c (working copy) @@ -96,14 +96,13 @@ static int do_sa_get(struct sockaddr **sap, const struct osockaddr *osa, int *osalen, struct malloc_type *mtype) { - int error=0, bdom; struct sockaddr *sa; struct osockaddr *kosa; - int alloclen; #ifdef INET6 + struct sockaddr_in6 *sin6; int oldv6size; - struct sockaddr_in6 *sin6; #endif + int alloclen, bdom, error, hdrlen, pathlen; if (*osalen < 2 || *osalen > UCHAR_MAX || !osa) return (EINVAL); @@ -133,6 +132,17 @@ do_sa_get(struct sockaddr **sap, const struct osoc goto out; } + if (bdom == AF_LOCAL) { + hdrlen = offsetof(struct sockaddr_un, sun_path); + if (alloclen > hdrlen) { + pathlen = sizeof(struct sockaddr_un) - hdrlen; + alloclen = strnlen(kosa->sa_data, pathlen); + if (alloclen == pathlen) + log(LOG_DEBUG, "long sockaddr_un truncated\n"); + alloclen += hdrlen; + } + } + #ifdef INET6 /* * Older Linux IPv6 code uses obsolete RFC2133 struct sockaddr_in6, @@ -696,13 +706,26 @@ static int linux_bind(struct thread *td, struct linux_bind_args *args) { struct sockaddr *sa; - int error; + int error, pathlen; error = linux_getsockaddr(&sa, PTRIN(args->name), args->namelen); if (error) return (error); + /* + * XXX Anonymous Unix domain socket not supported. + */ + if (sa->sa_family == AF_LOCAL) { + pathlen = sa->sa_len - offsetof(struct sockaddr_un, sun_path); + if (pathlen <= 0) { + free(sa, M_SONAME); + if (pathlen == 0) + return (0); + return (EINVAL); + } + } + error = kern_bind(td, args->s, sa); free(sa, M_SONAME); if (error == EADDRNOTAVAIL && args->namelen != sizeof(struct sockaddr_in)) @@ -723,13 +746,26 @@ linux_connect(struct thread *td, struct linux_conn struct socket *so; struct sockaddr *sa; u_int fflag; - int error; + int error, pathlen; error = linux_getsockaddr(&sa, (struct osockaddr *)PTRIN(args->name), args->namelen); if (error) return (error); + /* + * XXX Anonymous Unix domain socket not supported. + */ + if (sa->sa_family == AF_LOCAL) { + pathlen = sa->sa_len - offsetof(struct sockaddr_un, sun_path); + if (pathlen <= 0) { + free(sa, M_SONAME); + if (pathlen == 0) + return (ENOENT); + return (EINVAL); + } + } + error = kern_connect(td, args->s, sa); free(sa, M_SONAME); if (error != EISCONN) Index: sys/conf/files =================================================================== --- sys/conf/files (revision 225884) +++ sys/conf/files (working copy) @@ -2548,6 +2548,7 @@ libkern/strlcpy.c standard libkern/strlen.c standard libkern/strncmp.c standard libkern/strncpy.c standard +libkern/strnlen.c standard libkern/strsep.c standard libkern/strspn.c standard libkern/strstr.c standard Index: sys/libkern/strnlen.c =================================================================== --- sys/libkern/strnlen.c (revision 225884) +++ sys/libkern/strnlen.c (working copy) @@ -0,0 +1,42 @@ +/*- + * Copyright (c) 2009 David Schultz + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include + +size_t +strnlen(const char *s, size_t maxlen) +{ + size_t len; + + for (len = 0; len < maxlen; len++, s++) { + if (!*s) + break; + } + return (len); +} Index: sys/sys/libkern.h =================================================================== --- sys/sys/libkern.h (revision 225884) +++ sys/sys/libkern.h (working copy) @@ -116,6 +116,7 @@ size_t strlen(const char *); int strncasecmp(const char *, const char *, size_t); int strncmp(const char *, const char *, size_t); char *strncpy(char * __restrict, const char * __restrict, size_t); +size_t strnlen(const char *, size_t); char *strsep(char **, const char *delim); size_t strspn(const char *, const char *); char *strstr(const char *, const char *); --Boundary-00=_UqkhOqNyGfbBJVR-- From owner-freebsd-emulation@FreeBSD.ORG Fri Sep 30 23:54:04 2011 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E5D3106566B for ; Fri, 30 Sep 2011 23:54:04 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) by mx1.freebsd.org (Postfix) with ESMTP id EB36C8FC13 for ; Fri, 30 Sep 2011 23:54:03 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.5/8.14.5) with ESMTP id p8UNs31P032305; Fri, 30 Sep 2011 17:54:03 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.5/8.14.5/Submit) with ESMTP id p8UNs1dd032302; Fri, 30 Sep 2011 17:54:03 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Fri, 30 Sep 2011 17:54:01 -0600 (MDT) From: Warren Block To: Hub- FreeBSD In-Reply-To: <156697DC-0D33-46A8-A719-096EED0EE699@hub.org> Message-ID: References: <87FBE966-B70F-48F2-9771-796DA8D3032D@hub.org> <156697DC-0D33-46A8-A719-096EED0EE699@hub.org> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="-902635197-362712741-1317426843=:32221" X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (wonkity.com [127.0.0.1]); Fri, 30 Sep 2011 17:54:03 -0600 (MDT) Cc: freebsd-emulation@freebsd.org Subject: =?utf-8?q?Re=3A_VirtualBox=3A_64bit_FreeBSD_guest_on_64bit_FreeB?= =?utf-8?b?U0QgaG9zdCDigKYgIkxvbmcgTW9kZSI/?= X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2011 23:54:04 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. ---902635197-362712741-1317426843=:32221 Content-Type: TEXT/PLAIN; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8BIT On Fri, 30 Sep 2011, Hub- FreeBSD wrote: > > 'k, I assumed that was what happened when I set "--ostype FreeBSD_64" … I take it there is another switch I need to use? What I found with the GUI was that changing an existing VM to 64-bit did not work, it had to be created as 64-bit in the first place. ---902635197-362712741-1317426843=:32221-- From owner-freebsd-emulation@FreeBSD.ORG Sat Oct 1 00:13:48 2011 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C8050106564A for ; Sat, 1 Oct 2011 00:13:48 +0000 (UTC) (envelope-from freebsd@hub.org) Received: from hub.org (hub.org [200.46.204.220]) by mx1.freebsd.org (Postfix) with ESMTP id 81E398FC15 for ; Sat, 1 Oct 2011 00:13:48 +0000 (UTC) Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by hub.org (Postfix) with ESMTP id 1954E1D33002; Fri, 30 Sep 2011 21:13:46 -0300 (ADT) Received: from hub.org ([200.46.204.220]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 41507-03; Sat, 1 Oct 2011 00:13:46 +0000 (UTC) Received: from [192.168.1.4] (24-246-4-43.cable.teksavvy.com [24.246.4.43]) by hub.org (Postfix) with ESMTPA id 59EBC1D33001; Fri, 30 Sep 2011 21:13:45 -0300 (ADT) Mime-Version: 1.0 (Apple Message framework v1244.3) Content-Type: text/plain; charset=windows-1252 From: Hub- FreeBSD In-Reply-To: Date: Fri, 30 Sep 2011 20:13:44 -0400 Content-Transfer-Encoding: quoted-printable Message-Id: References: <87FBE966-B70F-48F2-9771-796DA8D3032D@hub.org> <156697DC-0D33-46A8-A719-096EED0EE699@hub.org> To: Warren Block X-Mailer: Apple Mail (2.1244.3) Cc: freebsd-emulation@freebsd.org Subject: =?windows-1252?q?Re=3A_VirtualBox=3A_64bit_FreeBSD_guest_on_64bi?= =?windows-1252?q?t_FreeBSD_host_=85_=22Long_Mode=22=3F?= X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Oct 2011 00:13:48 -0000 'k, I'm doing everything from the command line, and when I did the = createvm, and according to the docs = (https://www.virtualbox.org/manual/ch08.html#idp12400368), there eis no = option to set 64 vs 32bit =85 even the modifyvm section only seems to = have the --ostype option, and in this case, I had set it to FreeBSD_64, = based on what is displayed when you do a 'list ostypes', as what should = be for a 64bit environment =85 So, either something is broken, or I'm missing an argument / setting = here :( On 2011-09-30, at 7:54 PM, Warren Block wrote: > On Fri, 30 Sep 2011, Hub- FreeBSD wrote: >=20 >>=20 >> 'k, I assumed that was what happened when I set "--ostype FreeBSD_64" = =85 I take it there is another switch I need to use? >=20 > What I found with the GUI was that changing an existing VM to 64-bit = did not work, it had to be created as 64-bit in the first = place._______________________________________________ > freebsd-emulation@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-emulation > To unsubscribe, send any mail to = "freebsd-emulation-unsubscribe@freebsd.org" From owner-freebsd-emulation@FreeBSD.ORG Sat Oct 1 00:19:28 2011 Return-Path: Delivered-To: freebsd-emulation@FreeBSD.org Received: by hub.freebsd.org (Postfix, from userid 1233) id 432E61065670; Sat, 1 Oct 2011 00:19:28 +0000 (UTC) Date: Sat, 1 Oct 2011 00:19:28 +0000 From: Alexander Best To: Jung-uk Kim Message-ID: <20111001001928.GA16489@freebsd.org> References: <4E857719.7060306@freebsd.org> <201109301803.01010.jkim@FreeBSD.org> <201109301902.44281.jkim@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <201109301902.44281.jkim@FreeBSD.org> Cc: freebsd-emulation@FreeBSD.org, security-officer@freebsd.org Subject: Re: HEADS UP: breakage with linux emulation + SA-11:05.unix X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Oct 2011 00:19:28 -0000 On Fri Sep 30 11, Jung-uk Kim wrote: > On Friday 30 September 2011 06:02 pm, Jung-uk Kim wrote: > > [Removed freebsd-security@] > > > > On Friday 30 September 2011 04:00 am, FreeBSD Security Officer > wrote: > > > Hi all, > > > > > > It appears that the security fix in SA-11:05.unix exposed a bug > > > in the linux emulation code: Linux has a different size of > > > sockaddr_un than FreeBSD, and the linux emulation code was > > > passing socket addresses through without doing any translation > > > first. > > > > > > This appears to break all X-using Linux code -- both applications > > > and plugins such as the widely-used flash plugin -- and probably > > > other Linux applications too. > > > > > > I am working on a fix for this and will send an updated advisory > > > out as soon as it's ready. > > > > For the impatient, I have written *unofficial* patch for this > > Linuxulator regression. > > > > Please note that I am posting this patch to this ML only because I > > wanted to point out Linuxulator is actually missing very important > > feature, i.e., anonymous Unix domain socket. > > I have updated the patch. It should be slightly more safer than the > previous version. This patch is also available from here: > > http://people.freebsd.org/~jkim/linux_socket.diff i've applied your patch to a r225888 kernel and it fully fixed flash support for me. also i haven't experienced any issues in connection with the patch. good work! (: cheers. alex > > Please note this is an *unofficial* fix. > > Jung-uk Kim > Index: sys/compat/linux/linux_socket.c > =================================================================== > --- sys/compat/linux/linux_socket.c (revision 225884) > +++ sys/compat/linux/linux_socket.c (working copy) > @@ -96,14 +96,13 @@ static int > do_sa_get(struct sockaddr **sap, const struct osockaddr *osa, int *osalen, > struct malloc_type *mtype) > { > - int error=0, bdom; > struct sockaddr *sa; > struct osockaddr *kosa; > - int alloclen; > #ifdef INET6 > + struct sockaddr_in6 *sin6; > int oldv6size; > - struct sockaddr_in6 *sin6; > #endif > + int alloclen, bdom, error, hdrlen, pathlen; > > if (*osalen < 2 || *osalen > UCHAR_MAX || !osa) > return (EINVAL); > @@ -133,6 +132,17 @@ do_sa_get(struct sockaddr **sap, const struct osoc > goto out; > } > > + if (bdom == AF_LOCAL) { > + hdrlen = offsetof(struct sockaddr_un, sun_path); > + if (alloclen > hdrlen) { > + pathlen = sizeof(struct sockaddr_un) - hdrlen; > + alloclen = strnlen(kosa->sa_data, pathlen); > + if (alloclen == pathlen) > + log(LOG_DEBUG, "long sockaddr_un truncated\n"); > + alloclen += hdrlen; > + } > + } > + > #ifdef INET6 > /* > * Older Linux IPv6 code uses obsolete RFC2133 struct sockaddr_in6, > @@ -696,13 +706,26 @@ static int > linux_bind(struct thread *td, struct linux_bind_args *args) > { > struct sockaddr *sa; > - int error; > + int error, pathlen; > > error = linux_getsockaddr(&sa, PTRIN(args->name), > args->namelen); > if (error) > return (error); > > + /* > + * XXX Anonymous Unix domain socket not supported. > + */ > + if (sa->sa_family == AF_LOCAL) { > + pathlen = sa->sa_len - offsetof(struct sockaddr_un, sun_path); > + if (pathlen <= 0) { > + free(sa, M_SONAME); > + if (pathlen == 0) > + return (0); > + return (EINVAL); > + } > + } > + > error = kern_bind(td, args->s, sa); > free(sa, M_SONAME); > if (error == EADDRNOTAVAIL && args->namelen != sizeof(struct sockaddr_in)) > @@ -723,13 +746,26 @@ linux_connect(struct thread *td, struct linux_conn > struct socket *so; > struct sockaddr *sa; > u_int fflag; > - int error; > + int error, pathlen; > > error = linux_getsockaddr(&sa, (struct osockaddr *)PTRIN(args->name), > args->namelen); > if (error) > return (error); > > + /* > + * XXX Anonymous Unix domain socket not supported. > + */ > + if (sa->sa_family == AF_LOCAL) { > + pathlen = sa->sa_len - offsetof(struct sockaddr_un, sun_path); > + if (pathlen <= 0) { > + free(sa, M_SONAME); > + if (pathlen == 0) > + return (ENOENT); > + return (EINVAL); > + } > + } > + > error = kern_connect(td, args->s, sa); > free(sa, M_SONAME); > if (error != EISCONN) > Index: sys/conf/files > =================================================================== > --- sys/conf/files (revision 225884) > +++ sys/conf/files (working copy) > @@ -2548,6 +2548,7 @@ libkern/strlcpy.c standard > libkern/strlen.c standard > libkern/strncmp.c standard > libkern/strncpy.c standard > +libkern/strnlen.c standard > libkern/strsep.c standard > libkern/strspn.c standard > libkern/strstr.c standard > Index: sys/libkern/strnlen.c > =================================================================== > --- sys/libkern/strnlen.c (revision 225884) > +++ sys/libkern/strnlen.c (working copy) > @@ -0,0 +1,42 @@ > +/*- > + * Copyright (c) 2009 David Schultz > + * All rights reserved. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above copyright > + * notice, this list of conditions and the following disclaimer in the > + * documentation and/or other materials provided with the distribution. > + * > + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > + * SUCH DAMAGE. > + */ > + > +#include > +__FBSDID("$FreeBSD$"); > + > +#include > + > +size_t > +strnlen(const char *s, size_t maxlen) > +{ > + size_t len; > + > + for (len = 0; len < maxlen; len++, s++) { > + if (!*s) > + break; > + } > + return (len); > +} > Index: sys/sys/libkern.h > =================================================================== > --- sys/sys/libkern.h (revision 225884) > +++ sys/sys/libkern.h (working copy) > @@ -116,6 +116,7 @@ size_t strlen(const char *); > int strncasecmp(const char *, const char *, size_t); > int strncmp(const char *, const char *, size_t); > char *strncpy(char * __restrict, const char * __restrict, size_t); > +size_t strnlen(const char *, size_t); > char *strsep(char **, const char *delim); > size_t strspn(const char *, const char *); > char *strstr(const char *, const char *); From owner-freebsd-emulation@FreeBSD.ORG Sat Oct 1 00:54:21 2011 Return-Path: Delivered-To: freebsd-emulation@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8AFED106566B for ; Sat, 1 Oct 2011 00:54:21 +0000 (UTC) (envelope-from scf@FreeBSD.org) Received: from mail.farley.org (mail.farley.org [IPv6:2001:470:1f07:14d3:2::11]) by mx1.freebsd.org (Postfix) with ESMTP id 205C68FC19 for ; Sat, 1 Oct 2011 00:54:21 +0000 (UTC) Received: from thor.farley.org (HPooka@thor.farley.org [IPv6:2001:470:1f07:14d3:1::5]) by mail.farley.org (8.14.5/8.14.5) with ESMTP id p910sI8P086590; Fri, 30 Sep 2011 20:54:19 -0400 (EDT) (envelope-from scf@FreeBSD.org) Date: Fri, 30 Sep 2011 20:54:18 -0400 (EDT) From: "Sean C. Farley" To: Hub- FreeBSD In-Reply-To: Message-ID: References: <87FBE966-B70F-48F2-9771-796DA8D3032D@hub.org> <156697DC-0D33-46A8-A719-096EED0EE699@hub.org> User-Agent: Alpine 2.02 (BSF 1266 2009-07-14) MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="56599777-476297738-1317430459=:5298" X-Spam-Status: No, score=-1.4 required=4.0 tests=AWL,BAYES_00,SPF_SOFTFAIL autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on mail.farley.org Cc: freebsd-emulation@FreeBSD.org Subject: =?utf-8?q?Re=3A_VirtualBox=3A_64bit_FreeBSD_guest_on_64bit_FreeB?= =?utf-8?b?U0QgaG9zdCDigKYgIkxvbmcgTW9kZSI/?= X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Oct 2011 00:54:21 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --56599777-476297738-1317430459=:5298 Content-Type: TEXT/PLAIN; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8BIT On Fri, 30 Sep 2011, Hub- FreeBSD wrote: > 'k, I'm doing everything from the command line, and when I did the > createvm, and according to the docs > (https://www.virtualbox.org/manual/ch08.html#idp12400368), there eis > no option to set 64 vs 32bit … even the modifyvm section only seems to > have the --ostype option, and in this case, I had set it to > FreeBSD_64, based on what is displayed when you do a 'list ostypes', > as what should be for a 64bit environment … > > So, either something is broken, or I'm missing an argument / setting > here :( The only difference between a 32-bit and 64-bit VM according to the XML files generated is whether I/O APIC is enabled. You could create a VM then use modifyvm to enable the I/O APIC: VBoxManage modifyvm --ioapic on > On 2011-09-30, at 7:54 PM, Warren Block wrote: >> On Fri, 30 Sep 2011, Hub- FreeBSD wrote: >> >>> >>> 'k, I assumed that was what happened when I set "--ostype >>> FreeBSD_64" … I take it there is another switch I need to use? >> >> What I found with the GUI was that changing an existing VM to 64-bit >> did not work, it had to be created as 64-bit in the first place. Sean -- scf@FreeBSD.org --56599777-476297738-1317430459=:5298-- From owner-freebsd-emulation@FreeBSD.ORG Sat Oct 1 17:58:36 2011 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E4401065700 for ; Sat, 1 Oct 2011 17:58:36 +0000 (UTC) (envelope-from freebsd@hub.org) Received: from hub.org (hub.org [200.46.204.220]) by mx1.freebsd.org (Postfix) with ESMTP id D492D8FC14 for ; Sat, 1 Oct 2011 17:58:35 +0000 (UTC) Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by hub.org (Postfix) with ESMTP id 3EBC91D33003; Sat, 1 Oct 2011 14:58:34 -0300 (ADT) Received: from hub.org ([200.46.204.220]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 08046-05; Sat, 1 Oct 2011 17:58:33 +0000 (UTC) Received: from [192.168.1.4] (24-246-4-43.cable.teksavvy.com [24.246.4.43]) by hub.org (Postfix) with ESMTPA id 4BE5F1D33002; Sat, 1 Oct 2011 14:58:33 -0300 (ADT) Mime-Version: 1.0 (Apple Message framework v1244.3) From: Hub- FreeBSD In-Reply-To: Date: Sat, 1 Oct 2011 13:58:32 -0400 Message-Id: <7F4C681F-098D-4C2F-81F7-6A20BDA9B282@hub.org> References: <87FBE966-B70F-48F2-9771-796DA8D3032D@hub.org> <156697DC-0D33-46A8-A719-096EED0EE699@hub.org> To: Sean C. Farley X-Mailer: Apple Mail (2.1244.3) Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-emulation@FreeBSD.org Subject: =?windows-1252?q?Re=3A_VirtualBox=3A_64bit_FreeBSD_guest_on_64bi?= =?windows-1252?q?t_FreeBSD_host_=85_=22Long_Mode=22=3F?= X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Oct 2011 17:58:36 -0000 On 2011-09-30, at 8:54 PM, Sean C. Farley wrote: > On Fri, 30 Sep 2011, Hub- FreeBSD wrote: >=20 >> 'k, I'm doing everything from the command line, and when I did the = createvm, and according to the docs = (https://www.virtualbox.org/manual/ch08.html#idp12400368), there eis no = option to set 64 vs 32bit =85 even the modifyvm section only seems to = have the --ostype option, and in this case, I had set it to FreeBSD_64, = based on what is displayed when you do a 'list ostypes', as what should = be for a 64bit environment =85 >>=20 >> So, either something is broken, or I'm missing an argument / setting = here :( >=20 > The only difference between a 32-bit and 64-bit VM according to the = XML files generated is whether I/O APIC is enabled. You could create a = VM then use modifyvm to enable the I/O APIC: > VBoxManage modifyvm --ioapic on 'k, that didn't help any =85 still get told no long mode, use a 32bit = distro =85 showvminfo shows: Name: vbox.hub.org Guest OS: Linux 2.6 (64 bit) UUID: cd5424cc-4fd3-40b3-8745-c2c4f5583639 Config file: /vm/1/vbox.hub.org/vbox.hub.org.vbox Snapshot folder: /vm/1/vbox.hub.org/Snapshots Log folder: /vm/1/vbox.hub.org/Logs Hardware UUID: cd5424cc-4fd3-40b3-8745-c2c4f5583639 Memory size: 512MB Page Fusion: off VRAM size: 8MB HPET: off Chipset: piix3 Firmware: BIOS Number of CPUs: 1 Synthetic Cpu: off CPUID overrides: None Boot menu mode: message and menu Boot Device (1): Floppy Boot Device (2): DVD Boot Device (3): HardDisk Boot Device (4): Not Assigned ACPI: on IOAPIC: on PAE: on Time offset: 0 ms RTC: local time Hardw. virt.ext: on Hardw. virt.ext exclusive: on Nested Paging: on Large Pages: on VT-x VPID: on State: powered off (since 2011-10-01T17:44:25.000000000) Tried also --chipset ich9 --hwvirtex of Reading through the section on Hardware vs Software Virtualization, = apparently VT-X has to be enabled for 64bit guests =85 now, on the = server I'm using, looking at dmesg for ny CPU Features: CPU: Intel(R) Xeon(R) CPU E5420 @ 2.50GHz (2500.10-MHz = K8-class CPU) Origin =3D "GenuineIntel" Id =3D 0x1067a Family =3D 6 Model =3D 17 = Stepping =3D 10 = Features=3D0xbfebfbff = Features2=3D0x40ce3bd AMD Features=3D0x20100800 AMD Features2=3D0x1 TSC: P-state invariant Cores per package: 4 I don't see VTX in there =85 *should* I? Is this a case of, = unbeknownst to me, it isn't enabled in the BIOS? This is a remote = server, so a quick reboot / check isn't the easiest to do, so would = alike to confirm before I go down that route =85 can someone that does = have 64bit guests working check their CPU Features and let me know if I = am missing that Feature here? :( Thx =85 From owner-freebsd-emulation@FreeBSD.ORG Sat Oct 1 19:06:40 2011 Return-Path: Delivered-To: freebsd-emulation@FreeBSD.org Received: from mx2.freebsd.org (mx2.freebsd.org [IPv6:2001:4f8:fff6::35]) by hub.freebsd.org (Postfix) with ESMTP id DFC16106566C; Sat, 1 Oct 2011 19:06:40 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from 172-17-198-245.globalsuite.net (hub.freebsd.org [IPv6:2001:4f8:fff6::36]) by mx2.freebsd.org (Postfix) with ESMTP id 1B01D14DB68; Sat, 1 Oct 2011 19:06:40 +0000 (UTC) Message-ID: <4E8764BF.8090206@FreeBSD.org> Date: Sat, 01 Oct 2011 12:06:39 -0700 From: Doug Barton Organization: http://SupersetSolutions.com/ User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:7.0) Gecko/20110928 Thunderbird/7.0 MIME-Version: 1.0 To: Hub- FreeBSD References: <87FBE966-B70F-48F2-9771-796DA8D3032D@hub.org> <156697DC-0D33-46A8-A719-096EED0EE699@hub.org> <7F4C681F-098D-4C2F-81F7-6A20BDA9B282@hub.org> In-Reply-To: <7F4C681F-098D-4C2F-81F7-6A20BDA9B282@hub.org> X-Enigmail-Version: undefined OpenPGP: id=1A1ABC84 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Cc: freebsd-emulation@FreeBSD.org, "Sean C. Farley" Subject: =?windows-1252?q?Re=3A_VirtualBox=3A_64bit_FreeBSD_guest_on_64bi?= =?windows-1252?q?t_FreeBSD_host_=85_=22Long_Mode=22=3F?= X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Oct 2011 19:06:41 -0000 FWIW I have 64-bit guests working fine on my still-9-current (r225756) amd64 host with the latest ports vbox. I'm running it with the gui in X, not sure if that makes a difference. On 10/01/2011 10:58, Hub- FreeBSD wrote: > PAE: on I have PAE off for all hosts, but I just tried turning it on for my FreeBSD 64 bit guest and it didn't make a difference. > Reading through the section on Hardware vs Software Virtualization, > apparently VT-X has to be enabled for 64bit guests Yes, it will not work otherwise. > … now, on the > server I'm using, looking at dmesg for ny CPU Features: > > CPU: Intel(R) Xeon(R) CPU E5420 @ 2.50GHz (2500.10-MHz > K8-class CPU) Origin = "GenuineIntel" Id = 0x1067a Family = 6 > Model = 17 Stepping = 10 > Features=0xbfebfbff > > Features2=0x40ce3bd > AMD Features=0x20100800 AMD Features2=0x1 TSC: > P-state invariant Cores per package: 4 > > > I don't see VTX in there … *should* I? I don't think so, my equivalent lines are identical to yours except that I have and SMX in Features2 which seems to be a "safe mode" extension. > Is this a case of, unbeknownst to me, it isn't enabled in the BIOS? This is (unfortunately) likely. The relevant stuff wasn't enabled in mine by default. Also, the name for the option may not be straightforward. On my Dell the option is called VMM, Virtual Machine Monitor. I had to do a bit of trial and error before I found the right knob. > This is a remote > server, so a quick reboot / check isn't the easiest to do, so would > alike to confirm before I go down that route … can someone that does > have 64bit guests working check their CPU Features and let me know if > I am missing that Feature here? :( hth, Doug -- Nothin' ever doesn't change, but nothin' changes much. -- OK Go Breadth of IT experience, and depth of knowledge in the DNS. Yours for the right price. :) http://SupersetSolutions.com/ From owner-freebsd-emulation@FreeBSD.ORG Sat Oct 1 20:44:07 2011 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CB805106566B; Sat, 1 Oct 2011 20:44:07 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from mail.ebusiness-leidinger.de (mail.ebusiness-leidinger.de [217.11.53.44]) by mx1.freebsd.org (Postfix) with ESMTP id 873D88FC08; Sat, 1 Oct 2011 20:44:07 +0000 (UTC) Received: from outgoing.leidinger.net (p4FC46F8B.dip.t-dialin.net [79.196.111.139]) by mail.ebusiness-leidinger.de (Postfix) with ESMTPSA id 8FC95844016; Sat, 1 Oct 2011 22:28:33 +0200 (CEST) Received: from unknown (IO.Leidinger.net [192.168.1.12]) by outgoing.leidinger.net (Postfix) with ESMTP id D0F1E15FE; Sat, 1 Oct 2011 22:28:30 +0200 (CEST) Date: Sat, 1 Oct 2011 22:28:31 +0200 From: Alexander Leidinger To: Jung-uk Kim Message-ID: <20111001222831.00003cdc@unknown> In-Reply-To: <201109301902.44281.jkim@FreeBSD.org> References: <4E857719.7060306@freebsd.org> <201109301803.01010.jkim@FreeBSD.org> <201109301902.44281.jkim@FreeBSD.org> X-Mailer: Claws Mail 3.7.10cvs7 (GTK+ 2.16.6; i586-pc-mingw32msvc) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-EBL-MailScanner-Information: Please contact the ISP for more information X-EBL-MailScanner-ID: 8FC95844016.AFFF5 X-EBL-MailScanner: Found to be clean X-EBL-MailScanner-SpamCheck: not spam, spamhaus-ZEN, SpamAssassin (not cached, score=-1, required 6, autolearn=disabled, ALL_TRUSTED -1.00) X-EBL-MailScanner-From: alexander@leidinger.net X-EBL-MailScanner-Watermark: 1318105715.54804@UJJ+zxITNeUSHWmXI/jsbQ X-EBL-Spam-Status: No Cc: freebsd-emulation@FreeBSD.org Subject: Re: HEADS UP: breakage with linux emulation + SA-11:05.unix X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 01 Oct 2011 20:44:07 -0000 On Fri, 30 Sep 2011 19:02:41 -0400 Jung-uk Kim wrote: > On Friday 30 September 2011 06:02 pm, Jung-uk Kim wrote: > > [Removed freebsd-security@] > > > > On Friday 30 September 2011 04:00 am, FreeBSD Security Officer > wrote: > > > Hi all, > > > > > > It appears that the security fix in SA-11:05.unix exposed a bug > > > in the linux emulation code: Linux has a different size of > > > sockaddr_un than FreeBSD, and the linux emulation code was > > > passing socket addresses through without doing any translation > > > first. > > > > > > This appears to break all X-using Linux code -- both applications > > > and plugins such as the widely-used flash plugin -- and probably > > > other Linux applications too. > > > > > > I am working on a fix for this and will send an updated advisory > > > out as soon as it's ready. > > > > For the impatient, I have written *unofficial* patch for this > > Linuxulator regression. > > > > Please note that I am posting this patch to this ML only because I > > wanted to point out Linuxulator is actually missing very important > > feature, i.e., anonymous Unix domain socket. Did you see http://student.agh.edu.pl/~mjguzik/linux_sockaddr_un.patch ? He has a AF_INET and a AF_LOCAL part in his patch. I haven't reviewed it for correctness (emulation-sense), but maybe it's something to look at and maybe to add. Bye, Alexander. -- http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID = B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID = 72077137