NetBSD Problem Report #58130

From www@netbsd.org  Tue Apr  9 12:33:17 2024
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 9C0F61A9239
	for <gnats-bugs@gnats.NetBSD.org>; Tue,  9 Apr 2024 12:33:17 +0000 (UTC)
Message-Id: <20240409123311.193481A923A@mollari.NetBSD.org>
Date: Tue,  9 Apr 2024 12:33:11 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: missing data-dependent memory prefetch vulnerability mitigations
X-Send-Pr-Version: www-1.0

>Number:         58130
>Category:       kern
>Synopsis:       missing data-dependent memory prefetch vulnerability mitigations
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Apr 09 12:35:00 +0000 2024
>Originator:     Taylor R Campbell
>Release:        current, 10, 9, 8, ...
>Organization:
The NetBSData-dependent Prefetchation
>Environment:
>Description:
Some modern CPUs have data-dependent memory prefetchers (DMP), which try to be clever about traversing linked lists by prefetching at an address loaded into a register if it looks like it might be a pointer.

This can leak secrets, such as crypto keys, through cache-timing side channels.

https://gofetch.fail/

CPU microarchitectures currently known to be affected:

- Apple M2
- Apple M3
- Intel Raptor Lake (13th Generation)
>How-To-Repeat:

>Fix:
Possible mitigations:

- Set the DIT/DOIT bit (data-(operand-)independent timing): https://gnats.NetBSD.org/57230

  Note: It is NOT ENOUGH to set this just around crypto operations.  For example, the DMP will almost certainly apply to the data in copyin/copyout, affecting secret keys passed over pipes between processes.  So, like I recommended in that PR, the DIT/DOIT bit should be set in the kernel (with a sysctl to disable it globally).

- Some CPU-specific bits like this: https://social.treehouse.systems/@marcan/112238385679496096

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2024 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.