Received: by 2002:a05:7412:bbc7:b0:fc:a2b0:25d7 with SMTP id kh7csp3145856rdb; Tue, 6 Feb 2024 08:22:05 -0800 (PST) X-Google-Smtp-Source: AGHT+IHp5vZ/a8y93AOeh2EKgWW01ow7rm4m0Auu0Hl8VzlPK4UVxCRSSfPaguzgtZFXIdr/IHij X-Received: by 2002:a05:622a:348:b0:42b:ff26:fab7 with SMTP id r8-20020a05622a034800b0042bff26fab7mr3486918qtw.66.1707236524834; Tue, 06 Feb 2024 08:22:04 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707236524; cv=pass; d=google.com; s=arc-20160816; b=ajqFHvSBphFxDNT+Q3OR7I9/dMM3LvBcF0qC1mlgMMwc64vhSbDObZPRjXXXBj+3Xm 0NymLmb8Dsc20COTWEBhVdIGU3mg45i1DkfMAlRCkZg3ucw/OGYBFwFuql2SwfVyBCWH Hhxm6b6jGTsJkgCmTpz7R1djpOFdDzQVoqCWtKVl1/aOz3KP32whg15PNZqaTGGn/jxP IEYBNe1+O6mqemH3lpKXf9eLUGf2/v9lO7UqaW+fDB2I3F4AK8j7AY3bIIvduvQ57DL9 Bn/wg83PhuKddsaWDmQd9Grk0DSNAUdUMTyydJIIIxHjPZ+mK9AfMCXauK6+0RIymyrZ HVNQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:message-id:date:subject:cc:to :from; bh=NrmiCq/s8iK7mBUVuxR1jg6uceUGXTNjREAOFsSULUs=; fh=rEbaUGBwit9za/jMofGY/ooXHpE8X/RC7gjTuCHwlnI=; b=QzP3MyzNGD8H3adGIX1HKo44IN+f1Jp7ijk1s8r0/1R64435JasHNk9070rD2lceXD QXOE6dRjHUNNK9ycpYXpfdJ1Iax1kE89IEkhG/OIT/SjzY0c2s0ZnjgdqyKgqXOiVywD ybnfs/yqJad67XhFzViIIRlqwElu/fBPn5xkilaoOkZ1kG4JTVDNhM6J8hGd8abrsFwD EONuKpWqk0QyRXFwA0rQs+M/jISE+2p1qu5T+nOi5cS8MV3sk5P2NGyy6VBzkq7jtEQL 7sWKy0sG0lKnjeqjNyBFi7+a8WPjssuJ51brnMeGr773Z46yPdPq98+frbjgzZomNnKx vokw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=altlinux.org); spf=pass (google.com: domain of linux-kernel+bounces-55312-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55312-linux.lists.archive=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=1; AJvYcCWchRIBLYLRfbVZMv/savQEYXlpnGcJtfc7xHp/g/MSfSxqNd9CKDdM5U2ov0H3Es1xKs9LULxOnk9OqfGDrk62uSJaPxcAvItkKSuaiw== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id i1-20020ac85c01000000b0042a3360cbb6si2614400qti.538.2024.02.06.08.22.04 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 06 Feb 2024 08:22:04 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-55312-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=altlinux.org); spf=pass (google.com: domain of linux-kernel+bounces-55312-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-55312-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 95B111C23673 for ; Tue, 6 Feb 2024 16:22:04 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 871AC1350C4; Tue, 6 Feb 2024 16:21:56 +0000 (UTC) Received: from air.basealt.ru (air.basealt.ru [194.107.17.39]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CD4E2134CE7; Tue, 6 Feb 2024 16:21:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=194.107.17.39 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707236516; cv=none; b=tX6/YQe1cqxqcA1GxTQCTr1KU8l8ehj0myz7w8Gzndu86ytmif1S3ewFcZsmgn6y4S/EHFnp4b3nvdJZLsOmAgZs7KtvoAuVin0OcMUTCC8OmOgnVyloy7xwfoFJ4zd+k4OyLereY/4L1PcR2u3ciYP+l64ZHlU2gG/PM/9cB1Y= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707236516; c=relaxed/simple; bh=NbkL5XfG6+SdYyqh4jAsn7dWL31t3PQHaDc2LY+xSQQ=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=gsINK8BSi0mOgGThKYTa0l6nwTSFRrS2/kedT6aj20xJxBk8sO80xOSoF53l8r80pTv3rv/LT9GIg/wDOogbTgFNT8i5FATHDG06HhQdKTOuYmQFcpqf09B8kQfLwRgMU8tNBNDrCgO4Yb14JV8ZLn56X9fy81KsZIO8EQ7bcHo= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=altlinux.org; spf=pass smtp.mailfrom=altlinux.org; arc=none smtp.client-ip=194.107.17.39 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=altlinux.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=altlinux.org Received: by air.basealt.ru (Postfix, from userid 490) id A655D2F20247; Tue, 6 Feb 2024 16:11:48 +0000 (UTC) X-Spam-Level: Received: from altlinux.malta.altlinux.ru (obninsk.basealt.ru [217.15.195.17]) by air.basealt.ru (Postfix) with ESMTPSA id 350FC2F20247; Tue, 6 Feb 2024 16:11:46 +0000 (UTC) From: kovalev@altlinux.org To: stable@vger.kernel.org, gregkh@linuxfoundation.org Cc: linux-kernel@vger.kernel.org, linux-cifs@vger.kernel.org, keescook@chromium.org, sfrench@samba.org, pc@manguebit.com, harshit.m.mogalapalli@oracle.com Subject: [PATCH 5.15.y 0/1] smb: client: fix "df: Resource temporarily unavailable" on 5.15 stable kernel Date: Tue, 6 Feb 2024 19:11:10 +0300 Message-Id: <20240206161111.454699-1-kovalev@altlinux.org> X-Mailer: git-send-email 2.33.8 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit ATTENTION! Before applying this patch a conflict patch in the queue needs to be removed: https://git.kernel.org/pub/scm/linux/kernel/git/stable/stable-queue.git/tree/queue-5.15/cifs-fix-off-by-one-in-smb2_query_info_init.patch Describe bug: After mounting a remote cifs resource, it becomes unavailable: df: /mnt/sambashare: Resource temporarily unavailable It was tested on the following Linux kernel: Linux altlinux 5.15.148 The error appeared starting from kernel 5.15.147 after adding the commit [1] "smb: client: fix OOB in SMB2_query_info_init()", in which the buffer length increases by 1 as a result of changes: . - iov[0].iov_len = total_len - 1 + input_len; + iov[0].iov_len = len; . [1] https://patchwork.kernel.org/project/cifs-client/patch/20231213152557.6634-2-pc@manguebit.com/ Error fixed by backported commit in next patch adapted for the 5.15 kernel: [PATCH 5.15.y 1/1] smb3: Replace smb2pdu 1-element arrays with flex-arrays P.S. I have already backported similar changes for the 5.10.y kernel [2], but I did not know that there was the same error on 5.15, since I only deal with kernels 5.10 and 6.1. Therefore, this patch is to follow the rules of backport to stable branches. [2] https://lore.kernel.org/all/2024012613-woozy-exhume-7b9d@gregkh/T/