Received: by 10.223.164.202 with SMTP id h10csp464187wrb; Wed, 8 Nov 2017 20:44:43 -0800 (PST) X-Google-Smtp-Source: ABhQp+S6MwG32IBoL/qTabYYCZ4AL8UJFvDFdR15MF2uJqT5ejAoGslGQ/3nWdrvu7adkJ7uIGZp X-Received: by 10.84.217.93 with SMTP id e29mr1581957plj.223.1510202683247; Wed, 08 Nov 2017 20:44:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510202683; cv=none; d=google.com; s=arc-20160816; b=p4Db55oicnADo9lwLM/MdicfjcLx0TV1jvVA/ZS/YhXU15+UXTYUPLkLJrBlRIZdMp hb/llACcZy/S/keumCOIL5o5mmyOpdCANyZgzYCYKLYJJnbJ7x1v2uSgXWtHB6LOViF3 /mSSfzXnT2VQV+kos+N4XeIfDdG9Z2X6+Tp3Lv/s0/rWQPhwLsxVHgbjg31ghWzZKf4N 9fmz/z+xnH+2vb6+OJ4hzEIqJ3t6LMJgdToC9AvRF8PSzUnLgP4qGKybsiPz0mjowThZ 0DNxgsgfGztrQv4595rj56jjVqF4aFxYVmlPFJ8ZDFQ8jwn9xHcw9YpZjShRPVYBNr4N 5yng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=ycX/L55xeFz0+dmU3M+1/ffa2umdWCbK04WRKfGOQUI=; b=JXSSRjS57cPXn8cqBslqIDd53A1K/zZDWs5VTfhLBh2A6romDS9Tt1elVA/PUcRCFu kVBYdMINnoT/VqBXFh4IGZLnQF6yvAnaIff3IDhDpebtbpqKSlahmfRXqDSJQSFmO8ta 7LMBcsAcgYWQqWKQIpAYij3T2ZDk8y+lJOGsJGZbdBkppLZDtn+ji+Q8jmc9FN2NcEHs NU3kCntfBu+ty8nWNmhu8FjxmeBwlJo7szv7L0HdEvK83VXuc4DTnL2coOLz9k4pgnKb roIYPIU20g2NC9Fv4nurDbRowmLGwCzGOSf3CJnga2cCM+RTXEVuA3b1BUclXVpffkyz qRUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=iwsZLr1D; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e190si5604917pfe.93.2017.11.08.20.44.32; Wed, 08 Nov 2017 20:44:43 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=iwsZLr1D; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752508AbdKIEnt (ORCPT + 82 others); Wed, 8 Nov 2017 23:43:49 -0500 Received: from mail-oi0-f66.google.com ([209.85.218.66]:53664 "EHLO mail-oi0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752005AbdKIEnr (ORCPT ); Wed, 8 Nov 2017 23:43:47 -0500 Received: by mail-oi0-f66.google.com with SMTP id h6so3581347oia.10; Wed, 08 Nov 2017 20:43:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=ycX/L55xeFz0+dmU3M+1/ffa2umdWCbK04WRKfGOQUI=; b=iwsZLr1DhtXZ55Ec6JR4e5EcoOcDzlCKWnNeOzcBFG6FiW4jGLZx8wAY1gCbzW5J3n 7qE8AWdnnz47Zc+yKHAFcFHNZ/MHetvPuIsd8n2WH3LXBiWTKTi2LNzRuJlvB9clCecI 6llT2bvqzAijIsL1341Sr2Zuc0lHnryN2MOKijAFHPi8x3miEsPN4OClYQ9N3SrZJFAm Tet/sCFvQC4Duharq/HzXARbKIXB1LhGLueLK8UdQAnDGBcrnC0iB6AZrk8oolwQfqts +nqH3shEDmyUsmsRu1Wz8feazOOc12b2RGBedlXFXXar/zbNgXVajiFkvPEz8ixEos6j o/TQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=ycX/L55xeFz0+dmU3M+1/ffa2umdWCbK04WRKfGOQUI=; b=BjMJPo1jKMVFfIX3OMf0OD8lbqmC5wyYLo+8vm/4W3czefXoiO1p4A1oohj1dFPsqT 1azwhjmdFuB1gl90P7BTiOLWjqvYrg8OizDgE3qp3DvGR4E7K0R1f/M43134uP1XsQY7 C63PFkCr9G3R7/aaEDIdjot9l54UORlzq5sbZbno/RmNgldvQSYgRmdF0/laR2oGBw/s 3pkGkqKy3C67BSj8VR00w0orse+IpV6gPAIl/tE5oWr7YEzJbt21d82hb2gV+nl3EIEa 7xdVax6UGNC3vJzA4MQKiKJ69DWawqMcaTYRXA0y2/HPnZU1mPL+4uv/3w0vGzVvLgLA 3zyw== X-Gm-Message-State: AJaThX5z5eAJAlZfB9ppf4L0jhp5Xcuq1128URFIU1m4aozpQ2qGJi0J BJNbWNQx/f2HjG/e3OtqPj2rBM/1YPRpJt0F3q4= X-Received: by 10.202.59.86 with SMTP id i83mr1589743oia.211.1510202626574; Wed, 08 Nov 2017 20:43:46 -0800 (PST) MIME-Version: 1.0 Received: by 10.74.138.199 with HTTP; Wed, 8 Nov 2017 20:43:26 -0800 (PST) In-Reply-To: References: <1510050731-32446-1-git-send-email-me@tobin.cc> From: Kaiwan N Billimoria Date: Thu, 9 Nov 2017 10:13:26 +0530 Message-ID: Subject: Re: [kernel-hardening] [PATCH v4] scripts: add leaking_addresses.pl To: Linus Torvalds Cc: Laura Abbott , "Tobin C. Harding" , "kernel-hardening@lists.openwall.com" , "Jason A. Donenfeld" , "Theodore Ts'o" , Kees Cook , Paolo Bonzini , Tycho Andersen , "Roberts, William C" , Tejun Heo , Jordan Glover , Greg KH , Petr Mladek , Joe Perches , Ian Campbell , Sergey Senozhatsky , Catalin Marinas , Will Deacon , Steven Rostedt , Chris Fries , Dave Weinstein , Daniel Micay , Djalal Harouni , Linux Kernel Mailing List , Network Development , David Miller Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > But I don't know if there is anything else than the profiling code > that _really_ wants access to /proc/kallsyms in user space as a > regular user. Am unsure about this, but kprobes? (/jprobes/kretprobes), and by extension, wrappers over this infra (like SystemTap)? I (hazily) recollect a script I once wrote (years back though) that collects kernel virtual addresses off of kallsyms for the purpose of passing them to a 'helper' kernel module that uses kprobes. I realize that 'modern' kprobes exposes APIs that just require the symbolic name & that they're anyway at kernel privilege... but the point is, a usermode script was picking up and passing the kernel addresses. Also, what about kernel addresses exposed via System.map? Oh, just checked, it's root rw only.. pl ignore. > That said, that patch also fixes the /proc/kallsyms root check, in > that now you can do: > > sudo head < /proc/kallsyms > > and it still shows all zeroes - because the file was *opened* as a > normal user. That's how UNIX file access security works, and how it is > fundamentally supposed to work (ie passing a file descriptor to a sui > program doesn't magically make it gain privileges). Indeed. From 1583552546386907317@xxx Thu Nov 09 02:09:52 +0000 2017 X-GM-THRID: 1583410491222242898 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread