From owner-svn-src-all@freebsd.org Tue Apr 26 18:03:07 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3AC50B1DA87; Tue, 26 Apr 2016 18:03:07 +0000 (UTC) (envelope-from uspoerlein@gmail.com) Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id DBDB617C7; Tue, 26 Apr 2016 18:03:06 +0000 (UTC) (envelope-from uspoerlein@gmail.com) Received: by mail-wm0-x244.google.com with SMTP id w143so6458446wmw.3; Tue, 26 Apr 2016 11:03:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc; bh=3ODHgCz2is0GI/yDsHo5AbNDqqZah4LWPYTb6ay38+Q=; b=IbLiaWP0sPoWmkEcr95N2Zpe+cLnvqVxwG5kHoFxSLQ8MwQeJ/6nMBuPwSAMprR+iP CrWUGRgS3QTYhlTMmjewe/sSKxz7SiL6MtsFuWS1yRakZMX4Y1Re3s/HQrqox630B2J0 phBsaSPneI2hZJZci126c+STf2k/0U/J8zIgUtiuX7f+pFmN8ESzo3z+A/QAX1do0D1o 34phkruA6TPRIkZPPAfW6hkdpA26c0nTw4TwntfGA2XBKN1AA8ErVC4uURNDNibRxL4x HfmDc4W22uSSKqoz16i1yw620prBj2bq8hE4Vf1H025/EAJC1APao38WIvu51xn+vSti ofWQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc; bh=3ODHgCz2is0GI/yDsHo5AbNDqqZah4LWPYTb6ay38+Q=; b=ZOy6oXkBdDvaTcHNv0F5ItwyBOS6nfBQH19tGd2hPcdpQA4xKUZs2vuza5XzprbsuE Qnr1XPeug+Vk7wk85Mx56c7oXezNBxZxCgIDedHu9lhrbF2enku61wf63JrKK/GR59i/ N/VazegsPBOhmIrxU5J+S1mU5wFI4XlJoKYqU5H8ckLo32J/WGVShool+jEFiJZX3t8P aoN7c6GlFkyVAsglEaY2BQlhkOoA5E849EKYsl0sZd5QaqTH3vWKJl+aMv7bgUCx1lvl 1l1Z736pEymZpyMsBPucjA/KfUbYDrkjfFi1FsARQWxLT3oza8KeVRPwwIXeAMwiduMz sYng== X-Gm-Message-State: AOPr4FWGER5ssQPxvbBv4P46AVuk6rqxhxp65NRdqJEj0as9BwNnbVeZU+nwa0V1Hpycv2zZ8rrwxp/VuRVc9g== MIME-Version: 1.0 X-Received: by 10.194.21.65 with SMTP id t1mr4678659wje.12.1461693784163; Tue, 26 Apr 2016 11:03:04 -0700 (PDT) Received: by 10.194.43.231 with HTTP; Tue, 26 Apr 2016 11:03:04 -0700 (PDT) In-Reply-To: <201604251706.u3PH6okj031018@repo.freebsd.org> References: <201604251706.u3PH6okj031018@repo.freebsd.org> Date: Tue, 26 Apr 2016 11:03:04 -0700 Message-ID: Subject: Re: svn commit: r298585 - in head: sys/kern usr.sbin/jail From: =?UTF-8?Q?Ulrich_Sp=C3=B6rlein?= To: Jamie Gritton Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Apr 2016 18:03:07 -0000 2016-04-25 10:06 GMT-07:00 Jamie Gritton : > Author: jamie > Date: Mon Apr 25 17:06:50 2016 > New Revision: 298585 > URL: https://svnweb.freebsd.org/changeset/base/298585 > > Log: > Encapsulate SYSV IPC objects in jails. Define per-module parameters > sysvmsg, sysvsem, and sysvshm, with the following bahavior: > > inherit: allow full access to the IPC primitives. This is the same as > the current setup with allow.sysvipc is on. Jails and the base system > can see (and moduly) each other's objects, which is generally considered > a bad thing (though may be useful in some circumstances). > > disable: all no access, same as the current setup with allow.sysvipc off. > > new: A jail may see use the IPC objects that it has created. It also > gets its own IPC key namespace, so different jails may have their own > objects using the same key value. The parent jail (or base system) can > see the jail's IPC objects, but not its keys. > > PR: 48471 > Submitted by: based on work by kikuchan98@gmail.com > MFC after: 5 days > > Modified: > head/sys/kern/sysv_msg.c > head/sys/kern/sysv_sem.c > head/sys/kern/sysv_shm.c > head/usr.sbin/jail/jail.8 Looks like some bad sbuf_deletes, see the recent Coverity report (are you folks getting these emails?) *** CID 1354974: Memory - corruptions (BAD_FREE) /sys/kern/sysv_shm.c: 1043 in sysctl_shmsegs() 1037 shmseg->u.shm_perm.key = IPC_PRIVATE; 1038 } 1039 1040 sbuf_bcat(&sb, shmseg, sizeof(*shmseg)); 1041 } 1042 error = sbuf_finish(&sb); >>> CID 1354974: Memory - corruptions (BAD_FREE) >>> "sbuf_delete" frees address of "sb". 1043 sbuf_delete(&sb); 1044 1045 done: 1046 SYSVSHM_UNLOCK(); 1047 return (error); 1048 } ** CID 1354975: Memory - corruptions (BAD_FREE) and one in sysv_msg.c