[{"id":3677597,"web_url":"http://patchwork.ozlabs.org/comment/3677597/","msgid":"<20260415110809.3987-1-linuxtestproject.agent@gmail.com>","list_archive_url":null,"date":"2026-04-15T11:08:09","subject":"Re: [LTP] lib: New library function tst_get_free_uid","submitter":{"id":93132,"url":"http://patchwork.ozlabs.org/api/people/93132/","name":null,"email":"linuxtestproject.agent@gmail.com"},"content":"Hi Wei,\n\nOn Wed, 15 Apr 2026, Wei Gao wrote:\n> open16: allow restricted O_CREAT of FIFOs and regular files\n\n--- [PATCH 2/2] ---\n\nOn Wed, 15 Apr 2026, Wei Gao wrote:\n> open16: allow restricted O_CREAT of FIFOs and regular files\n\n> +\tSAFE_FILE_PRINTF(PROTECTED_REGULAR, \"2\");\n> +\tSAFE_FILE_PRINTF(PROTECTED_FIFOS, \"2\");\n> +\tSAFE_CHMOD(DIR, 0020 | S_ISVTX);\n> +\n> +\tif (!SAFE_FORK()) {\n> +\t\tSAFE_SETUID(uid2);\n> +\t\tTST_EXP_FAIL(openat(dir_fd, TEST_FILE, O_RDWR | O_CREAT, 0777), EACCES);\n> +\t\tTST_EXP_FAIL(open(TEST_FIFO_PATH, O_RDWR | O_CREAT, 0777), EACCES);\n\nuid2 is a free (unused) UID with no group memberships. With mode 0020|S_ISVTX\nthe \"other\" bits are 0, so the kernel's DAC check rejects openat/open before\nreaching the protected_regular/protected_fifos logic in may_open(). EACCES\nfires for the wrong reason.\n\nFor a valid level-2 test the directory needs group-execute and group-write\n(e.g. 0770|S_ISVTX), and uid2 must be placed in the directory's owning group\nso it can access the directory but is still blocked by the protection check.\n\n---\nNote:\n\nOur agent completed the review of the patch. The full review can be\nfound at: <review_url>\n\nThe agent can sometimes produce false positives although often its\nfindings are genuine. If you find issues with the review, please\ncomment this email or ignore the suggestions.\n\nRegards,\nLTP AI Reviewer","headers":{"Return-Path":"<ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it>","X-Original-To":["incoming@patchwork.ozlabs.org","ltp@lists.linux.it"],"Delivered-To":["patchwork-incoming@legolas.ozlabs.org","ltp@picard.linux.it"],"Authentication-Results":["legolas.ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256\n header.s=20251104 header.b=fhKq+aua;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=lists.linux.it\n (client-ip=2001:1418:10:5::2; helo=picard.linux.it;\n envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it;\n receiver=patchwork.ozlabs.org)"],"Received":["from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fwdfs2WB2z1yCv\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 15 Apr 2026 21:08:19 +1000 (AEST)","from picard.linux.it (localhost [IPv6:::1])\n\tby picard.linux.it (Postfix) with ESMTP id 00A043E5DEC\n\tfor <incoming@patchwork.ozlabs.org>; Wed, 15 Apr 2026 13:08:17 +0200 (CEST)","from in-2.smtp.seeweb.it (in-2.smtp.seeweb.it\n [IPv6:2001:4b78:1:20::2])\n (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n key-exchange X25519 server-signature ECDSA (secp384r1))\n (No client certificate requested)\n by picard.linux.it (Postfix) with ESMTPS id ADF5F3C22A5\n for <ltp@lists.linux.it>; Wed, 15 Apr 2026 13:08:13 +0200 (CEST)","from mail-dy1-x1342.google.com (mail-dy1-x1342.google.com\n [IPv6:2607:f8b0:4864:20::1342])\n (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)\n key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest\n SHA256)\n (No client certificate requested)\n by in-2.smtp.seeweb.it (Postfix) with ESMTPS id AB92B60094A\n for <ltp@lists.linux.it>; Wed, 15 Apr 2026 13:08:12 +0200 (CEST)","by mail-dy1-x1342.google.com with SMTP id\n 5a478bee46e88-2d891442388so5622457eec.0\n for <ltp@lists.linux.it>; Wed, 15 Apr 2026 04:08:12 -0700 (PDT)","from\n runnervm35a4x.oz3hdax1fqteba02tevjkwltrd.yx.internal.cloudapp.net\n ([57.151.138.147]) by smtp.gmail.com with ESMTPSA id\n 5a478bee46e88-2de8f960dd1sm2082354eec.25.2026.04.15.04.08.10\n (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n Wed, 15 Apr 2026 04:08:10 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=gmail.com; s=20251104; t=1776251291; x=1776856091; darn=lists.linux.it;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:from:to:cc:subject:date\n :message-id:reply-to;\n bh=3xpKCN8ssO7O6PwEddFTbFV+9yw0ncVKxPOFqHTZDVI=;\n b=fhKq+aua4kocat6wNawx1br138bo4AAQ3TEYmoXClUDgnyUshwrcr6MydfPVBjXGp/\n 5ZgYDC7MSkgu0Tk5LD5nZjIcvzPLO6Sjvu24OXYTMZKEfMA2tazfUYaBdpW8vDEV5IQV\n gCxxIZHqrU9ajHstQrTzLmKEw3fy8LbwSJ+n+UCSHtxTYBng4TEEc0je5h+fP1EUtnDn\n AZV522doyb5po0tk5mNn/YnX4GO1Yco5W18jMCYo2Rgc2HQt6dzp9XMsF5RKV2yxbxps\n JYaIOgzpLSOCxTRvOMQuaISs14TTxXYfDLbg/ZuUnWbEynjVS9HrMWgKjocfRsiXyuu8\n pX8Q==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n d=1e100.net; s=20251104; t=1776251291; x=1776856091;\n h=content-transfer-encoding:mime-version:references:in-reply-to\n :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from\n :to:cc:subject:date:message-id:reply-to;\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WTJ6HGc0WhrdHhXKzabaSB53ObMaPo+lU\n apAPhHzrnR2Vyb0ajXUj4uhYDCUxPPaDhOnW7SRsEl325bHkz4=","X-Received":"by 2002:a05:7300:e790:b0:2db:2089:460f with SMTP id\n 5a478bee46e88-2db20894cfbmr4526543eec.19.1776251290876;\n Wed, 15 Apr 2026 04:08:10 -0700 (PDT)","From":"linuxtestproject.agent@gmail.com","To":"Wei Gao <wegao@suse.com>","Date":"Wed, 15 Apr 2026 11:08:09 +0000","Message-ID":"<20260415110809.3987-1-linuxtestproject.agent@gmail.com>","X-Mailer":"git-send-email 2.53.0","In-Reply-To":"<20260415103812.21999-2-wegao@suse.com>","References":"<20260415103812.21999-2-wegao@suse.com>","MIME-Version":"1.0","X-Spam-Status":"No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID,\n DKIM_VALID_AU,DKIM_VALID_EF,DMARC_PASS,FREEMAIL_FROM,SPF_HELO_NONE,\n SPF_PASS shortcircuit=no autolearn=disabled version=4.0.1","X-Spam-Checker-Version":"SpamAssassin 4.0.1 (2024-03-25) on in-2.smtp.seeweb.it","X-Virus-Scanned":"clamav-milter 1.0.9 at in-2.smtp.seeweb.it","X-Virus-Status":"Clean","Subject":"Re: [LTP] lib: New library function tst_get_free_uid","X-BeenThere":"ltp@lists.linux.it","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"Linux Test Project <ltp.lists.linux.it>","List-Unsubscribe":"<https://lists.linux.it/options/ltp>,\n <mailto:ltp-request@lists.linux.it?subject=unsubscribe>","List-Archive":"<http://lists.linux.it/pipermail/ltp/>","List-Post":"<mailto:ltp@lists.linux.it>","List-Help":"<mailto:ltp-request@lists.linux.it?subject=help>","List-Subscribe":"<https://lists.linux.it/listinfo/ltp>,\n <mailto:ltp-request@lists.linux.it?subject=subscribe>","Cc":"ltp@lists.linux.it","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Errors-To":"ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it","Sender":"\"ltp\" <ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it>"}}]