From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 79D2144C7C for ; Thu, 19 Dec 2024 01:23:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734571387; cv=none; b=H9F/HXuSe+4oTzVl0HMeouyH/eowtfwqTRjEzap4XCNGbVOyK14cFq4x/Y6irE4oNfaDF+wvHfQVB9AchqTYojfEBzeKURZBHCl7qGDK3Immt+wTuqI28wb4593UzoWCRPDJGhd2ae7ITkvPYJ2HPuk/wPhR18fFThPH2nKVkdY= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1734571387; c=relaxed/simple; bh=Tbak//pYHZPG144nbrfNB94EQTLiziG5l5yIbuEttXU=; h=Message-ID:Date:From:To:Cc:Subject; b=tKSl7SXgXXASqN7QWxSFZyCND7bibH75itmeQOB+QGGq9+8MJ0xsNZ2fXoiLK5eEIFwocnu+qd1SifCyciS1pNq5uH1qOPS5jicGN51P+L7EZSaA9yy/hnDErkJUg7gCMzaDd3ijzNDwjBmPoaslYn0hq+FVVY5++YPJvH7qwE4= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id F3974C4CECD; Thu, 19 Dec 2024 01:23:06 +0000 (UTC) Received: from rostedt by gandalf with local (Exim 4.98) (envelope-from ) id 1tO5GU-00000009mNQ-1cBI; Wed, 18 Dec 2024 20:23:46 -0500 Message-ID: <20241219012311.649442084@goodmis.org> User-Agent: quilt/0.68 Date: Wed, 18 Dec 2024 20:23:11 -0500 From: Steven Rostedt To: linux-kernel@vger.kernel.org Cc: Masami Hiramatsu , Mark Rutland , Mathieu Desnoyers , Andrew Morton Subject: [for-linus][PATCH 0/2] ring-buffer: Fixes for v6.13 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: ring-buffer fixes for v6.13: - Fix possible overflow of mmapped ring buffer with bad offset If the mmap() to the ring buffer passes in a start address that is passed the end of the mmapped file, it is not caught and a slab-out-of-bounds is triggered. Add a check to make sure the start address is within the bounds - Do not use TP_printk() to boot mapped ring buffers As a boot mapped ring buffer's data may have pointers that map to the previous boot's memory map, it is unsafe to allow the TP_printk() to be used to read the boot mapped buffer's events. If a TP_printk() points to a static string from within the kernel it will not match the current kernel mapping if KASLR is active, and it can fault. Have it simply print out the raw fields. git://git.kernel.org/pub/scm/linux/kernel/git/trace/linux-trace.git ring-buffer/fixes Head SHA1: 8cd63406d08110c8098e1efda8aef7ddab4db348 Edward Adam Davis (1): ring-buffer: Fix overflow in __rb_map_vma Steven Rostedt (1): trace/ring-buffer: Do not use TP_printk() formatting for boot mapped buffers ---- kernel/trace/ring_buffer.c | 6 +++++- kernel/trace/trace.c | 9 +++++++++ 2 files changed, 14 insertions(+), 1 deletion(-)