From owner-svn-src-all@freebsd.org Wed Jun 27 13:46:30 2018 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1373B10250C3 for ; Wed, 27 Jun 2018 13:46:30 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x231.google.com (mail-io0-x231.google.com [IPv6:2607:f8b0:4001:c06::231]) (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 95FEA7E087 for ; Wed, 27 Jun 2018 13:46:29 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x231.google.com with SMTP id g7-v6so1940387ioh.11 for ; Wed, 27 Jun 2018 06:46:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=+jD43cHCtWepohF0TDojnoVq2uC4A293dXvj4LwsQnM=; b=WMpmfD5VCRKGsgjhFQziBg99NVqzRulbLHKEWwGICPfkMeAazASsRbfwMJf2TgutQ1 qym1+489lRBx5QIgD0vZy1R40xp8rQ4AarjJnejkfHoPNKQNxhSBxukoZGg4Su2jMruU /L+IAgm8qGVRWMJu9S6gPpQUy6QASYbnTwausb7oxQY9J1yIb33l05bSIwxf9hgFm+77 Ad+Iw/NlYA3+sW35sbKCuOgF9vCyfIoY6CPfI2KJU+rzojpkMgaAjUN9I+rw71n6UGdz kfuR8V3pZW138LxIxt2I4vEI5YxOqoRZF1HAwIcqoEQac83L1/rzCxOCZHllPG/Gk7rz XoeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=+jD43cHCtWepohF0TDojnoVq2uC4A293dXvj4LwsQnM=; b=unkQh2s0gQ01xS0d9+M7UmnvwhF7jXci2R5RxfxArA2U03Oed/GxrqGamuXelclUbN bawTMYv3eDYyGxQtI+Gd96JpvFuxlD0hDrvolMuNbkbpllopugr0mR6ruJjUYau+ns06 OhTsrxt8dBvLxUyTNU7hnRAxMPwyoDDV/wJtaQcwghvK+q/a3q9wiyHEsYNZ8zpkhrqK +XqzMsorQo36PPiN/UQ1Sy105BtOnvf3EKQAxNNoHZvdtWkobUFP1J2y6WPLHplsLw8T 9XN+VcWD42L27ONDmwhhtQbu+gfaH5nNjTZRKdA43qlSxkIwXLxJ+6WJWQ9hBAdCGnLr C4vg== X-Gm-Message-State: APt69E3poaz0vjMEh9NjYFAjY61Gm/MYzlsNukZ6QOr5dTFznUbFK8RS r245+RhzqSyl08UkvYC1yG6toCXLgG2z8ScBmKXL+w== X-Google-Smtp-Source: AAOMgpdcLIrZfVePHBV3BfCb5VwjWQHPPyuuB6FNyZhz/c7ncYVjjI//i4KnNW6JSzWeCrW9qQsQYz3mH4egmjkHqmo= X-Received: by 2002:a6b:280a:: with SMTP id o10-v6mr4937149ioo.168.1530107188987; Wed, 27 Jun 2018 06:46:28 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 2002:a4f:5945:0:0:0:0:0 with HTTP; Wed, 27 Jun 2018 06:46:28 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: <20180627134455.k6jvum4pnuejas3x@mutt-hbsd> References: <201806270411.w5R4B9ZB078994@repo.freebsd.org> <20180627134455.k6jvum4pnuejas3x@mutt-hbsd> From: Warner Losh Date: Wed, 27 Jun 2018 07:46:28 -0600 X-Google-Sender-Auth: UNndCKCC8dRb_FcLPhxSgp_OYsM Message-ID: Subject: Re: svn commit: r335690 - head/sys/kern To: Shawn Webb Cc: Oliver Pinter , "svn-src-head@freebsd.org" , "svn-src-all@freebsd.org" , "src-committers@freebsd.org" , Warner Losh Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.26 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.26 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: Wed, 27 Jun 2018 13:46:30 -0000 On Wed, Jun 27, 2018 at 7:44 AM, Shawn Webb wrote: > On Wed, Jun 27, 2018 at 07:42:52AM -0600, Warner Losh wrote: > > On Wed, Jun 27, 2018 at 12:59 AM, Oliver Pinter < > > oliver.pinter@hardenedbsd.org> wrote: > > > > > > > > > > > On Wednesday, June 27, 2018, Warner Losh wrote: > > > > > >> Author: imp > > >> Date: Wed Jun 27 04:11:09 2018 > > >> New Revision: 335690 > > >> URL: https://svnweb.freebsd.org/changeset/base/335690 > > >> > > >> Log: > > >> Fix devctl generation for core files. > > >> > > >> We have a problem with vn_fullpath_global when the file exists. Work > > >> around it by printing the full path if the core file name starts > with /, > > >> or current working directory followed by the filename if not. > > >> > > >> Sponsored by: Netflix > > >> Differential Review: https://reviews.freebsd.org/D16026 > > >> > > >> Modified: > > >> head/sys/kern/kern_sig.c > > >> > > >> Modified: head/sys/kern/kern_sig.c > > >> ============================================================ > > >> ================== > > >> --- head/sys/kern/kern_sig.c Wed Jun 27 04:10:48 2018 > (r335689) > > >> +++ head/sys/kern/kern_sig.c Wed Jun 27 04:11:09 2018 > (r335690) > > >> @@ -3431,24 +3431,6 @@ out: > > >> return (0); > > >> } > > >> > > >> -static int > > >> -coredump_sanitise_path(const char *path) > > >> -{ > > >> - size_t i; > > >> - > > >> - /* > > >> - * Only send a subset of ASCII to devd(8) because it > > >> - * might pass these strings to sh -c. > > >> - */ > > >> - for (i = 0; path[i]; i++) > > >> - if (!(isalpha(path[i]) || isdigit(path[i])) && > > >> - path[i] != '/' && path[i] != '.' && > > >> - path[i] != '-') > > >> - return (0); > > > > > > > > > This part of code existed to prevent shell code injection via file > names. > > > After this commit we lose this. > > > > > > > It's devd's job to prevent that, not the kernel's. > > Has devd been updated? Or is this particular vulnerability manifest > again? > devd is fine as far as I know, apart from the default action. I'm fixing that now. Warner