From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f47.google.com (mail-ed1-f47.google.com [209.85.208.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 49AD920E703 for ; Fri, 10 Jan 2025 14:08:45 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.208.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736518127; cv=none; b=Se/4alDO/dXK8J1QUfZh3Ou9NQGEg+ZGoT6Q8Udh9NHa5q6JYeskn3H/N0lBLUvySVNRiZEqaPCDn6qYYJ38W//oexc13SXotBJOCzC2TJ1TOni2xr/0MTQXirg7nSR7yiOeQfmVIrQdWuebjJTAKlZBjt42U7pSIhi6Zneq8oM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1736518127; c=relaxed/simple; bh=/4fpWhioTGSiSnlYkbyWirFUQqaK8UeMZl+KaNGFz8s=; h=From:To:Cc:Subject:In-Reply-To:References:Date:Message-ID: MIME-Version:Content-Type; b=InLXszPeLBxtuRMJXcCPt027/AJB9EyEjkiStMeb1FRrLR9yBI2E0QI6y1qcqctJXtHuJ/aHB27OGNm72QTmj7k1b7KGB+Fl0cbDDm0Bfn3ZCJRucie6DKAoYXmZFXZy453WXyE4Vet4VgV8c29oILCNJlx1Q8XxOVgIPT70lPE= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=cloudflare.com; spf=pass smtp.mailfrom=cloudflare.com; dkim=pass (2048-bit key) header.d=cloudflare.com header.i=@cloudflare.com header.b=HJjCHl03; arc=none smtp.client-ip=209.85.208.47 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=cloudflare.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=cloudflare.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=cloudflare.com header.i=@cloudflare.com header.b="HJjCHl03" Received: by mail-ed1-f47.google.com with SMTP id 4fb4d7f45d1cf-5d3cf094768so3610034a12.0 for ; Fri, 10 Jan 2025 06:08:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloudflare.com; s=google09082023; t=1736518123; x=1737122923; darn=vger.kernel.org; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:from:to:cc:subject:date:message-id:reply-to; bh=/4fpWhioTGSiSnlYkbyWirFUQqaK8UeMZl+KaNGFz8s=; b=HJjCHl03toVX55zgeoN/fRXYY5HSqIwAiSMc4CGx4y1BvvaR1CGeQrUZE1cwlLwOcW /xp8LyZsxuqlxs4ziPiWQ+bjYcuRhuSfF8Yuw5PZ165jpAGhRQujoeWYBXZ13UITk6zq 4nE4S2cR5YABPUgpNyySoewOjIh0K/tkNI+U0gNKbLpBdTk++rLGpFNRZyjo1JTmBn/6 VClCj4g6OIqSQmhv5D20lCaEPiF3ttOQKMwfXTGIoYgZS0YQiug65Hgcn37MbbRp3BVU vzqoyV/qB5b7IZovMbQ5zYv5TNz8d50tKGGhVEmIEWfRaBnG6PNgKVu2m9cNBbNZaLxs WyyA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736518123; x=1737122923; h=mime-version:message-id:date:references:in-reply-to:subject:cc:to :from:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=/4fpWhioTGSiSnlYkbyWirFUQqaK8UeMZl+KaNGFz8s=; b=sHmwq8TEoCPS/cm5z7E4QeU0+DwYx0sX94glotICATOMusvCTxMvsjLq2Kyn+fx48C MiVVdCo25i0XQbWBw+MMx2obg3T0l0VlUZOUkiA39O4XUx7JcUJGm2E/kUcVFEu9BXb/ L1w3FglYugS/i7KNc5u5biC42/LixBT1ZE9J2tojGw3ciOSLKPG81Ri9lzqFvq3USA1A r28fDcaMTQIB1sGCrDaO2tNauq6E1OV7n3g2OcbACJvd2UP8Akh3k/vcXaSLW8HXOKaw m/UQ2DUl8A66OxwDl7H6cEy4x8ZhlmfujE6BsWcOrA3KsIxsYdQKIH+0XU5+5OGJeMQV hijg== X-Forwarded-Encrypted: i=1; AJvYcCV5sx9DWvoRels8gmGvkpXEybcHqHuieKsYDQb48y9TufnaKViVMNy+3vN+9aIA5lDRcmm4Q0r0IrzFLmg=@vger.kernel.org X-Gm-Message-State: AOJu0Yyk6RScb1utA7DqbNCfbHxQKm4Va2hI5G1dAJW8iRG0ZgNs5Qhx qqe3WJumbF9b6E04YEsL+5yefPZ+SZ2/sxaBLcNiA7zXdqIRRxxYit/hn0MfXac= X-Gm-Gg: ASbGncvBO4GPCs6ngPL6TGylchFyWZk8bQmv+ztBfagbaL2F3VUMyU6gEx7M5utnDYa 2ny013MHWGonGdRR1wD8W3Je0kBV3V8i8XTzaRwSe6C3Qf95kJSk5pelIhN7oa8Y/OJeeVfhtg4 5B/f8y/T89YpSdTuQMtt0YvG3dLyev7VOGuYL007r6TgN3FKBW88ZIzpU4G6U8bEOp9R+H+fm/y SV4CfLHSSbC2vBICwAXXOxH4jIO8MFNp5Owq2c8g85znZU= X-Google-Smtp-Source: AGHT+IGIQYbUpXh7cueBL8u+LVHU7VjsngWLddnMaRJAFI6CPxHz1t8vrgnBNnJ5i/Or1JHaRylyLg== X-Received: by 2002:a17:907:7f1e:b0:aa6:7091:1e91 with SMTP id a640c23a62f3a-ab2ab66cf8cmr1002495766b.11.1736518123406; Fri, 10 Jan 2025 06:08:43 -0800 (PST) Received: from cloudflare.com ([2a09:bac5:506b:2dc::49:d0]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-ab2c90638acsm169414366b.20.2025.01.10.06.08.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Jan 2025 06:08:42 -0800 (PST) From: Jakub Sitnicki To: Ruan Bonan , Cong Wang Cc: "john.fastabend@gmail.com" , "davem@davemloft.net" , "edumazet@google.com" , "kuba@kernel.org" , "pabeni@redhat.com" , "netdev@vger.kernel.org" , "bpf@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "syzkaller@googlegroups.com" Subject: Re: [BUG] general protection fault in sock_map_link_update_prog - Reproducible with Syzkaller In-Reply-To: <877c9z9e3x.fsf@cloudflare.com> (Jakub Sitnicki's message of "Wed, 23 Oct 2024 14:51:30 +0200") References: <877c9z9e3x.fsf@cloudflare.com> Date: Fri, 10 Jan 2025 15:08:41 +0100 Message-ID: <87ldvi3gnq.fsf@cloudflare.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain On Wed, Oct 23, 2024 at 02:51 PM +02, Jakub Sitnicki wrote: > On Tue, Oct 22, 2024 at 02:36 AM GMT, Ruan Bonan wrote: >> I used Syzkaller and found that there is KASAN: null-ptr-deref (general protection fault in >> sock_map_link_update_prog) in net/core/sock_map.c in v6.12.0-rc2, which also causes a KASAN: >> slab-use-after-free at the same time. It looks like a concurrency bug in the >> BPF related subsystems. The >> reproducer is available, and I have reproduced this bug with it >> manually. Currently I can only reproduce this >> bug with root privilege. >> >> The detailed reports, config file, and reproducer program are attached in this >> e-mail. If you need further >> details, please let me know. > > Thanks for the report. I was also able to reproduce the KASAN splat with > the attached repro locally and will investigate futher. For the record, Cong fixed this bug in commit 740be3b9a6d7 ("sock_map: fix a NULL pointer dereference in sock_map_link_update_prog()") [1]. [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=740be3b9a6d73336f8c7d540842d0831dc7a808b