From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=95.215.58.156 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795880651; b=Ghgb68arP7K2evtA07QuRzYocpyMgX8QecTpPJd/WbwNplGU7ocQBFOU0x5XCTFNtYFm DBZpc08nKmUKXSvBd7P3uOqDTuDPc0MKvQ75NmcsC3DVI3z5Qk7WLg+DUrzApNaXKrmtA RwrKUiYzc+5HjNWbda2vfTfA0ftfXaciwWBxeYgDirGykt4qZkkm28ttpCcdg0Q75ci/J bzeB9x7U6epsR6ScNSVIUla7AmOZwFVMfOdGHekBaS4UyEpjT/Cm2Gq/n6spyEaAtqzYr nrr1P/PwStT/t+J6fQKytbr3LtrztC1VGB1C3TrnuH1IoXgJ6dhdsvlSaTK7AngvK0A== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795880651; h=DMARC-Filter:X-Envelope-To:DKIM-Signature:X-Envelope-To:Received: X-Mizu-Trace-ID:X-Migadu-Flow:Date:From:To:CC:Subject:In-Reply-To: Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding; bh=jmXAwhrQ5ymbsUfCpF+AujjmPlx/SR9pWQPVUIPpwIw=; b=z7SQrCQu+sp4v/Q4TMrSXvFEftx6LuhooC2zoLhAm0DJ9YtxalVcUdRqoAcvA1FsbDSd 3nZLZwUNuyqwBnJ3AnH8I4wqS2Ee5877EuAbKrzcuumItHgCjEUD/S4M/TkmoHY2cz/gx PIK+CRj2Tru+oxQUOKj+UprWYlxSBamJ1VMY0exWG2ThWWDCK4dNsE76ngiY1rvZbo42e lwM8xLi3LNIXp/HmpnLLO0hlTVJBj7oEt8jGyL+v5RJ10gqv3EhDIoew9pNGhnxOiogXb +UI+JD2U2/EiR8YafbDPaa3mo1B79XN+8/SVIwSDI3JHL5ya9PJjAqAUF8u4KYUFKCg== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=o+886Xs8; arc=none smtp.remote-ip=95.215.58.156 Received: from mta1.migadu.com (out-156.mta1.migadu.com [95.215.58.156]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EC5A9606A329 for ; Sat, 28 Nov 2026 15:44:10 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org EC5A9606A329 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key, unprotected) header.d=linux.dev header.i=@linux.dev header.a=rsa-sha256 header.s=key1 header.b=o+886Xs8 X-Envelope-To: stable@vger.kernel.org DKIM-Signature: a=rsa-sha256; bh=h9/ojpyf9XJxk3yOP6Ru5jzVP3UP2xz3CkNyDRojkGg=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1795880648; v=1; x=1796485448; b=o+886Xs8o09HN95+H6BNv2G9a8HOj8lPBZAfRodQOQvprQkPheS2nACCviSxc7AEVdPlOSFL LqhU4rAEXS5N/K8i8u0TQGYc4puiIRfjAaUKB9MZdQ09oOnVYFDc9qxz/0TocRzNAROUAMCVhym XTMEv08+s2bc1BbXZ9uNgXFY= X-Envelope-To: stable@vger.kernel.org Received: by smtp.migadu.com with ESMTPS id ecf4b895d0f29da1; Sat, 28 Nov 2026 15:44:07 +0000 X-Mizu-Trace-ID: ecf4b895d0f29da1 X-Migadu-Flow: FLOW_OUT Date: Sat, 28 Nov 2026 15:44:07 +0000 From: Bradley Morgan To: ndokutovich@gmail.com CC: brauner@kernel.org, jack@suse.cz, jlayton@kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, stable@vger.kernel.org, viro@zeniv.linux.org.uk Subject: Re: [PATCH 0/2] listns(): validate the reserved spare2 field In-Reply-To: <20261128140623.19-1-ndokutovich@gmail.com> Message-ID: <2DE3E250-2C87-4816-B96F-CD951F02BD6E@linux.dev> X-Mailing-List: stable@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit On 28 November 2026 14:06:21 GMT, Nikolai Dokutovich wrote: >copy_ns_id_req() rejects a non-zero @spare but not @spare2, although >struct ns_id_req documents both as reserved. Validate @spare2 the same >way, and extend the error-case selftest to cover it instead of only >@spare. > >Nikolai Dokutovich (2): > nstree: reject a non-zero spare2 in the listns() request > selftests/namespaces: check that listns() rejects a non-zero spare2 Had a nice read through, thanks for the tests, for the whole series, let's put, Reviewed-by: Bradley Morgan Also, a nice question, since I tend to be a bit ^Winsane^W Is this bug a edge case? Most bugs found nowadays in the kernel are edge cases, but they would still need to be merged, because again, it's still a case that can be reached. My question to you, is could this bug be actually reached? Like, would a future caller set spare2 as non zero? would the driver maintainer for example be silly enough to set non zero spare2, probably knowing the consequences (if they understood the code), well, if they didn't, it'd be their problem, no? I had a look at some callers, mostly selftests, and they all patch up this correctly, so this wouldn't be reachable RIGHT now. I added my tag because we will have to account for the future callers silliness (adding non zero spare2)... > > kernel/nstree.c | 2 +- > tools/testing/selftests/namespaces/listns_test.c | 11 +++++++++++ > 2 files changed, 12 insertions(+), 1 deletion(-) > > --- Thanks!