From patchwork Tue May 1 19:41:31 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rosen Penev X-Patchwork-Id: 907194 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="f25YZpCo"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="NC/36bo/"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40bBcY1drKz9s1w for ; Wed, 2 May 2018 05:41:49 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Subject:References: In-Reply-To:Message-Id:Date:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Jro3DB6yQrLeo9R7JEMl9fkAo1pHHdETrA+vQgadyds=; b=f25YZpCop3/Lxa sdMHg0rJbjpkm3fIdtAS4Cxk4QS6oorDrZHghCnEj4zyUl3THpz44Rs3Xy1Cw5/LiK/mc19gQLJpr ZsO0s3khz3ehyK5HiK738xc7TIVn5F+riKQXUZj4KR29P8iUEW6WtcMZ0h0WCvVgAvz7rjXVo95U7 UcHlBucbVZFbjhSKoRH+xocFCVPLDMg0xQ2UkSCnavScYoDHqbWKo0nhIy4BZKYDPF4IKZwAIEP1f 8cffwZOlfzCQ7IlNNwKt9QH+edZDd1LcDxBAieU3UOY59ES1NfbvEhukfpXvyw346HX2xu2xF0n0g JzCiC+X7UqSzT2ITQYrw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fDb9l-0006gf-D7; Tue, 01 May 2018 19:41:45 +0000 Received: from mail-pf0-x241.google.com ([2607:f8b0:400e:c00::241]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fDb9i-0006fw-Dd for lede-dev@lists.infradead.org; Tue, 01 May 2018 19:41:43 +0000 Received: by mail-pf0-x241.google.com with SMTP id a14so9803321pfi.1 for ; Tue, 01 May 2018 12:41:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Fkz58HuNFVRlbH4xhp6tC/xV31XMsEqNHOOYZ0A6LrY=; b=NC/36bo/WebbOluTfBu3tRkR6hFHVRsYs5jay1haiaJl6LzkdlSt60QOaG+cUIDaBv CpJVx03ukgsDuLz5UB6wK+BvZAhWIHUHlJ1Lk8bnQP5ZyPHjAit5lkwHZlJV+ROkmVBk RlnlSouXnk8SZgk1Zb6ZuRkHRAvu3bvbi0ZsEXnY0lqC2XlhIq8qp34hCQE3pOLO15Qf xp+mVQuu1IcDV4OCJbhmzlVl6amo9VOx6KCue465d0eNyElTnP4Xk0OW/gQ2zfVVfzKP WIFJ/+0mD/hNGoHd/A+jSUxB6Yq8ahSrXkC9dTxO0CtTFS2hwSQ4+5BzU4srKb1K9P6l xEqQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Fkz58HuNFVRlbH4xhp6tC/xV31XMsEqNHOOYZ0A6LrY=; b=VOFmvkQA7ITr7dVOU7IvFNzwRQPBhlX7DCPgwvWCPH/2bv1SYS8YrIDc/I+zzWuGJl H9otz+cBqyQy+W8CdZ6aY4S1nh2ysCnLNUCIAGJEUDmSosO2JpVK3fP9myouc3ITwrlL AkD1jOrYNAxd+R5cAXJVI65IBFerSJnu4/ZXrTGN5fpholdHpS78X5Lw3uZxcT/vFqgo Qzd7Zwu2e/MtGLIPqKl7xRVbwStbpGC0Sojb2eWi7D5sfAU+C/zo+521FF+7lt79C07w XxnkLsSQVIPMYzEgIrRUnvPoYyeARIBe/dm6UsQWL9An7u73lioh/sLtIf8gwNY95uSp JcAA== X-Gm-Message-State: ALQs6tAZcFCFqhNXDdXh7IftEq22fnEVUzkYnQdbqN11BWEy+jZkXeih Pp24Z9FW3GjnzMK9f3EVOq8vNObT X-Google-Smtp-Source: AB8JxZp9a3YY8myXWTSx+WpJOF9PaeMxApS5xU422qWB9bG/Z/rKy3OzbKFsQctfQihbp7c5OPT1XQ== X-Received: by 2002:a17:902:b949:: with SMTP id h9-v6mr17185464pls.146.1525203691079; Tue, 01 May 2018 12:41:31 -0700 (PDT) Received: from DESKTOP-CEH0M93.lan (astound-69-42-5-101.ca.astound.net. [69.42.5.101]) by smtp.gmail.com with ESMTPSA id h65sm24377278pfj.54.2018.05.01.12.41.29 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 01 May 2018 12:41:30 -0700 (PDT) From: Rosen Penev To: lede-dev@lists.infradead.org Date: Tue, 1 May 2018 12:41:31 -0700 Message-Id: <1525203691-896-1-git-send-email-rosenp@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <20180330221804.29241-3-rosenp@gmail.com> References: <20180330221804.29241-3-rosenp@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180501_124142_461795_EC2D9D81 X-CRM114-Status: UNSURE ( 9.69 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.1 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at http://www.dnswl.org/, no trust [2607:f8b0:400e:c00:0:0:0:241 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (rosenp[at]gmail.com) -0.0 SPF_PASS SPF: sender matches SPF record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain Subject: [LEDE-DEV] [PATCH V3] sysctl: Protect hard/symlinks by default. X-BeenThere: lede-dev@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Rosen Penev MIME-Version: 1.0 Sender: "Lede-dev" Errors-To: lede-dev-bounces+incoming=patchwork.ozlabs.org@lists.infradead.org There is no usecase for not protecting symlinks that I know of in OpenWrt. Not even on desktop systems where you have multiple users with a shell. Signed-off-by: Rosen Penev --- v2: Move to 10-default.conf file. v3: Edit patch description to be 75 characters per line. package/base-files/files/etc/sysctl.d/10-default.conf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/package/base-files/files/etc/sysctl.d/10-default.conf b/package/base-files/files/etc/sysctl.d/10-default.conf index 98867b7..bfe26ca 100644 --- a/package/base-files/files/etc/sysctl.d/10-default.conf +++ b/package/base-files/files/etc/sysctl.d/10-default.conf @@ -5,6 +5,10 @@ kernel.panic=3 kernel.core_pattern=/tmp/%e.%t.%p.%s.core fs.suid_dumpable=2 +#enable hard/symlink protection +fs.protected_hardlinks=1 +fs.protected_symlinks=1 + net.ipv4.conf.default.arp_ignore=1 net.ipv4.conf.all.arp_ignore=1 net.ipv4.ip_forward=1