Received: by 2002:a05:6a10:c7c6:0:0:0:0 with SMTP id h6csp50870pxy; Fri, 30 Jul 2021 23:33:04 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxfok2d0N/wNOsa8vEkrDR8gJoMOBUvdCvF5pdvKeALkLXOIjV567lNaKUHpFjMEVIsbYpn X-Received: by 2002:a92:c245:: with SMTP id k5mr979193ilo.143.1627713184192; Fri, 30 Jul 2021 23:33:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1627713184; cv=none; d=google.com; s=arc-20160816; b=XA6EmAsPZLz6SlXdtlYMHvEPcPHFgOPgVgdnmIvwZUOAZDsLEyVtzt61v+ZV75eB2U E6EHomfFxiNpLrRG2XyET2jvQYrF2WA/1DJspof02v1a+vDeqOg0i0KempjcQYQ9LtUl WtWOL+ar0wHkno0ZHAq9LV17kgVraZLz/4CkoIrW605uRWUuq/Uf3QD6UHHSAQTxmSMg gQzvrjDRZGxoEHTevKkq8x7hwqyXyki8zHrfSF4GkOhje2lbX8Pxyfnkq5Hhw2xO+63Z R22CZewe9HYYZ622tMAJAwABZzOMCTecDMk0ojTEkUvK/6EUxFzcY0zZyfZE+NgGu5v9 gvcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-language:content-transfer-encoding :mime-version:user-agent:date:message-id:subject:from:cc:to :dkim-signature; bh=qIjbr+bB3b2M/mjNyixbaPxC5u6C27XmhB1R4YVuR4A=; b=h00dq3uspcQTZ6ZiCsSV5w+ysDKq19495Xm5PAjy1vFzXAz53Xp4LYQb1lIaDqJlvc touuoYUb7+CSQaT+0rSqYp3TEt/wg0P9RQW/MOLRUNO8aTIe1efjfRBDyrLwzfVmT3x5 lyjnURiXR4Ny1iQCMpFq10R23qyAlznK0XjU9hzClfudEYDvszGAwNDRwMdaJ7k0ntqe V2nMPby/7cKyoB1i46QBs06SWIv2fZKOCDrEFwo+pAGpECpCWf0sWtREo9lmzBbGYNdA kdz4bMQPLuPkE4QIUnRtuUNlfSQMCij4cbqaoSs78WDFBFEIv3gpLU8jK2UOA6Y+DSG3 1s4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=sMj5HuKP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n3si4860982ioh.98.2021.07.30.23.32.52; Fri, 30 Jul 2021 23:33:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=sMj5HuKP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232024AbhGaGbL (ORCPT + 99 others); Sat, 31 Jul 2021 02:31:11 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50716 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231887AbhGaGbK (ORCPT ); Sat, 31 Jul 2021 02:31:10 -0400 Received: from mail-pl1-x635.google.com (mail-pl1-x635.google.com [IPv6:2607:f8b0:4864:20::635]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7A96C06175F for ; Fri, 30 Jul 2021 23:31:04 -0700 (PDT) Received: by mail-pl1-x635.google.com with SMTP id c16so13634211plh.7 for ; Fri, 30 Jul 2021 23:31:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=to:cc:from:subject:message-id:date:user-agent:mime-version :content-transfer-encoding:content-language; bh=qIjbr+bB3b2M/mjNyixbaPxC5u6C27XmhB1R4YVuR4A=; b=sMj5HuKPgFyPTo4c3LC5MzvgaL4cUri7Ek8+Fxf1TRLjqOt8nxke5Nv/FbO209pTX4 jtnROqrwCSzaThBSaiyq3KOI/rRDJAmu8kKS7wJ46wO9nd1VsGWpwv6kFg1a8U24v2tJ J01c2c+oVkh6uwE8O3lIJswOh/lfbyipccBsFYXsOakHE8Ea6fJ+JKpwq9ZsfdCB+QYw NTAWfKCOq9Ve1IrMsHbGX6XUQAkvVMZGQWoq5KQ7+TLt1z9+WP7ljklA91Sn6uWAgKaA 6CNVfrxE7LEpBfX13FPGU/0u2V7jS2xvB+OBNYWQtZoiRhm7nHdTcoBQun+NsgKCDFOU q/1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:cc:from:subject:message-id:date:user-agent :mime-version:content-transfer-encoding:content-language; bh=qIjbr+bB3b2M/mjNyixbaPxC5u6C27XmhB1R4YVuR4A=; b=eRdXgWkffqoFV9jEG/RWBYqFUlzz0QEnD+VLChHkqn31V8aafbVE6LsbXKlrxwmApD ztpIgWDXYuB/LFTtI+50pOvnVJXLy7aGuk+kDHPFZOMhYgPBbS5WzMKRiCcEGqX5f99v Tucwzc5aOLuCGKXdrilcB6qfMejT7pw2UVOoZobnJHrWvqVt4H3zyvTBx1NXI5Nka5Sh 1qbMGuV84kxa+L8LNUj80syd+UzIluJwTtUX0t9b7zVZw8R9TMwsD7Zjk7a5wlavO8yz l8K/UP61nTsImv5zsdLZSdlAiukERrynf5OWGPCgIb86dBJ2XW3w2c0gccPJUiqpCvR0 FpZQ== X-Gm-Message-State: AOAM530pGHzYEhWYEvm4bO/mRFTYql27rxeOkBdt92t/P5Qr7Eb4NR8v 0tVQ3OLEi8QZ7rDVWwkGjhI= X-Received: by 2002:a63:6c5:: with SMTP id 188mr2329643pgg.39.1627713064378; Fri, 30 Jul 2021 23:31:04 -0700 (PDT) Received: from [10.106.0.50] ([45.135.186.29]) by smtp.gmail.com with ESMTPSA id n17sm5263572pgj.93.2021.07.30.23.31.02 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 30 Jul 2021 23:31:04 -0700 (PDT) To: shaggy@kernel.org Cc: jfs-discussion@lists.sourceforge.net, linux-kernel@vger.kernel.org, baijiaju1990@gmail.com From: Li Tuo Subject: [BUG] jfs: possible uninitialized-variable access in xtSplitUp() Message-ID: <6b3b3a56-b77c-aff7-c9f1-94a99d4929d2@gmail.com> Date: Sat, 31 Jul 2021 14:31:02 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-US Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, Our static analysis tool finds a possible uninitialized-variable access in the jfs driver in Linux 5.14.0-rc3: At the beginning of the function xtSplitUp(), the variable rbn is not initialized. If sp->header.flag & BT_ROOT is true, 780:    rc = (sp->header.flag & BT_ROOT) ? xtSplitRoot(tid, ip, split, &rmp) : xtSplitPage(tid, ip, split, &rmp, &rbn); the varialbe rbn will remain uninitialized. However, it is accessed through: 814:    rcbn = rbn; I am not quite sure whether this possible uninitialized-variable access is real and how to fix it if it is real. Any feedback would be appreciated, thanks! Reported-by: TOTE Robot Best wishes, Tuo Li