From owner-svn-src-all@freebsd.org Wed Jun 27 13:45:18 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 19E571024F6F for ; Wed, 27 Jun 2018 13:45:18 +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 95CA07DE2A for ; Wed, 27 Jun 2018 13:45:17 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x231.google.com with SMTP id r24-v6so1940021ioh.9 for ; Wed, 27 Jun 2018 06:45:17 -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=XIVqNMlkqL1hFBs6wF3NoVMfBV5lwoL5u6d2dbtltaA=; b=Y+DPohSjmVUVKfdLOir8DBdOWcoDnw7S5p19viMuNCn7EAzQiN0P8OSUHnsh0hX1qT VqznJToh60S5ysmNGxM0uIIa5aMYUjFmmhUSHDK+FjUWmU1P09M7piGAQhs37/kdwFSa 4XnIAJ9Q8+oY/BM8f/B4eee2JSDom5HvXIJ/muwtK612SucxBEm4CbJRMRKe2Bef6PhI d5vaFOjthEj9CH7Nepm1DXuaxgTC0MXrd8bo/18NlL8y48+P+6WaIlDRm8rbGb3PB7yM +AfitzMkW9FdkRkKaDYE9K6JoNDYfysTtrNnqggs9LsOikm/mqqMdFoiRPnltbDeBb1M mD7g== 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=XIVqNMlkqL1hFBs6wF3NoVMfBV5lwoL5u6d2dbtltaA=; b=TnYC1pGD2JxlhQ/vuQ2k7Qmxs6GkJ1jiui5FEQGHAN15q+yeBX3FS6u9x7nrHWKoCC x+SR/UBIukSP4iYYamOnfLICzVglJMja7vJpegsgik3p6C2MdmqdgKelnIi/KGwW8YEz i1NrPF7SmYuCJCzNnvQMuNT+Pv/fa8lUeRygtqw/2xaqicScH5HIKJzgcVGirYfbkO+G EC4AL3ftiJ5KghR3OVA0fpWO6MuKGEsOYHOOVbLaDnBUPr3HWPqjwgvPdySpl3HpfCPY 0bZtoz/PUbY1Wnqh8hf5fucLE9xU4Lg93w5bvyLgPEVlpjxQK/9kXrbIa5td4aeFXNDl R+ug== X-Gm-Message-State: APt69E0ziU+/Xxk3ipoUJUAwqQqQU0MKIUBLH3HH1QC5JvnAX+428YLC tTbESxrP4i6wU01DPz3ZSh/SjsyslKsdqDH8uBpE/g== X-Google-Smtp-Source: AAOMgpfdvcks1gRQpDCGr+hsDl5IEGO376WPESUKnDFylVfcVzT65l2r0+dn8txNgpBOPkCFoR/IlSgbHiZKLDzJO10= X-Received: by 2002:a6b:29c4:: with SMTP id p187-v6mr4797884iop.299.1530107116989; Wed, 27 Jun 2018 06:45:16 -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:45:16 -0700 (PDT) X-Originating-IP: [2603:300b:6:5100:1052:acc7:f9de:2b6d] In-Reply-To: References: <201806270411.w5R4B9ZB078994@repo.freebsd.org> From: Warner Losh Date: Wed, 27 Jun 2018 07:45:16 -0600 X-Google-Sender-Auth: jXxUqLfk-DX0jwRvOtLUlt320qQ Message-ID: Subject: Re: svn commit: r335690 - head/sys/kern To: Oliver Pinter Cc: Warner Losh , "src-committers@freebsd.org" , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" 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:45:18 -0000 On Wed, Jun 27, 2018 at 7:42 AM, 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. > Though the default action doesn't at the moment... I'll fix that with proper quoting. Warner