From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933654AbdLRJzj (ORCPT ); Mon, 18 Dec 2017 04:55:39 -0500 Received: from nbd.name ([46.4.11.11]:46060 "EHLO nbd.name" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758314AbdLRJzh (ORCPT ); Mon, 18 Dec 2017 04:55:37 -0500 Subject: Re: [PATCH 1/3] kallsyms: don't leak address when symbol not found To: "Tobin C. Harding" , kernel-hardening@lists.openwall.com Cc: Steven Rostedt , Tycho Andersen , Linus Torvalds , Kees Cook , Andrew Morton , Daniel Borkmann , Masahiro Yamada , Alexei Starovoitov , linux-kernel@vger.kernel.org, Network Development References: <1513554812-13014-1-git-send-email-me@tobin.cc> <1513554812-13014-2-git-send-email-me@tobin.cc> From: Felix Fietkau Message-ID: <5b86abe3-2c9d-1396-777d-a5a8f19555ef@nbd.name> Date: Mon, 18 Dec 2017 10:55:34 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.13; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <1513554812-13014-2-git-send-email-me@tobin.cc> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2017-12-18 00:53, Tobin C. Harding wrote: > Currently if kallsyms_lookup() fails to find the symbol then the address > is printed. This potentially leaks sensitive information. Instead of > printing the address we can return an error, giving the calling code the > option to print the address or print some sanitized message. > > Return error instead of printing address to argument buffer. Leave > buffer in a sane state. > > Signed-off-by: Tobin C. Harding I think there should be a way to keep the old behavior for debugging. - Felix