From owner-freebsd-current@FreeBSD.ORG Sun Jul 28 19:31:41 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 99FC6D6E for ; Sun, 28 Jul 2013 19:31:41 +0000 (UTC) (envelope-from gprspb@mail.ru) Received: from fallback5.mail.ru (fallback5.mail.ru [94.100.176.59]) by mx1.freebsd.org (Postfix) with ESMTP id 4E2EF2707 for ; Sun, 28 Jul 2013 19:31:41 +0000 (UTC) Received: from smtp27.mail.ru (smtp27.mail.ru [94.100.176.180]) by fallback5.mail.ru (mPOP.Fallback_MX) with ESMTP id 664E7F000C9B for ; Sun, 28 Jul 2013 23:31:24 +0400 (MSK) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mail.ru; s=mail2; h=Content-Type:MIME-Version:Message-ID:Subject:To:From:Date; bh=z482WsYGovh6oABxGGE3TO7o3htXY4ajijnApXOAYko=; b=WisXnttUXVTNfWK17XYfmGhL9/eiq5VQ1Ht17I/Hfz/uEzzw689E3lGSmt66m44nYFHobzKNC9Dv+SqutRxdp6XoQ99I3dU2f/+qHVCe9uwHbhTwuC8LbJVP8YfAaNFFYou/cxVTp40+rRizkFZRRYuOERg/F8vbmnQvm2UVvwk=; Received: from [93.185.182.46] (port=19696 helo=gpr.nnz-home.ru) by smtp27.mail.ru with esmtpa (envelope-from ) id 1V3WgW-0005No-25 for freebsd-current@freebsd.org; Sun, 28 Jul 2013 23:31:16 +0400 Received: from gpr by gpr.nnz-home.ru with local (Exim 4.80.1 (FreeBSD)) (envelope-from ) id 1V3WgQ-0004aD-Nm for freebsd-current@freebsd.org; Sun, 28 Jul 2013 23:31:10 +0400 Date: Sun, 28 Jul 2013 23:31:10 +0400 From: Gennady Proskurin To: freebsd-current@freebsd.org Subject: ldd runs linux programs Message-ID: <20130728193110.GB17514@gpr.nnz-home.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam: Not detected X-Mras: Ok X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Jul 2013 19:31:41 -0000 Hello. When linux binary is passed to FreeBSD's ldd as argument, this binary is executed. I'm sure this is bug :) (with security involved) % uname -a FreeBSD gpr.nnz-home.ru 10.0-CURRENT FreeBSD 10.0-CURRENT #0 r253701+0a032f5: Sun Jul 28 07:43:10 MSK 2013 gpr@gpr.nnz-home.ru:/usr/obj/usr/src/freebsd-head/sys/GPR amd64 % which ldd /usr/bin/ldd % file /compat/linux/usr/bin/sqlite3 /compat/linux/usr/bin/sqlite3: ELF 32-bit LSB executable, Intel 80386, version 1 (GNU/Linux), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, BuildID[sha1]=0xd44ea68c3032844c0daf80a58ec18fe464bcdbe3, stripped % ldd /compat/linux/usr/bin/sqlite3 /compat/linux/usr/bin/sqlite3: SQLite version 3.5.9 Enter ".help" for instructions sqlite>