NetBSD Problem Report #58499

From www@netbsd.org  Sun Jul 28 15:04:18 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)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits)
	 client-signature RSA-PSS (2048 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id E710E1A9241
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 28 Jul 2024 15:04:18 +0000 (UTC)
Message-Id: <20240728150417.CEA141A9242@mollari.NetBSD.org>
Date: Sun, 28 Jul 2024 15:04:17 +0000 (UTC)
From: campbell+netbsd@mumble.net
Reply-To: campbell+netbsd@mumble.net
To: gnats-bugs@NetBSD.org
Subject: experimental wg(4) rate-limited log messages are racy
X-Send-Pr-Version: www-1.0

>Number:         58499
>Category:       kern
>Synopsis:       experimental wg(4) rate-limited log messages are racy
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Jul 28 15:05:00 +0000 2024
>Originator:     Taylor R Campbell
>Release:        current, 10
>Organization:
The NetWG Flogdation
>Environment:
>Description:
wg(4) uses ppsratecheck(9) to rate-limit logs, but various calls are done without any locks over the state, so it is racy.
>How-To-Repeat:
code inspection, high-parallelism wg(4) usage
>Fix:
Probably best to make a global percpu rate-limit state, so that it is shared by all interfaces and sessions and peers but doesn't require any locks.

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.