From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 B36C4611B for ; Sun, 28 May 2023 19:44:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 43B01C433D2; Sun, 28 May 2023 19:44:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1685303057; bh=CpLG7NOiNg+qULVZAh19q+rOHLU3KdkEc4vXup95nos=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Sl6IvhwbJwrBO0tbrDA3W6og7i0ekCcjK5JKCvXQewoosuqJVw34LbGQrBr00tyHR 1uA7jntC6ICQ8eusdROzsJOfY6LweiWzxWxVxy8CMeTGNedKkc6uTVpDIPxyJp4tyh cdSqgYLVH4KpM/s3BQTk7U+0vmEG0Go3SJaK6WOI= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Oleksij Rempel , Marc Kleine-Budde , Oliver Hartkopp Subject: [PATCH 5.10 136/211] can: isotp: recvmsg(): allow MSG_CMSG_COMPAT flag Date: Sun, 28 May 2023 20:10:57 +0100 Message-Id: <20230528190846.904355294@linuxfoundation.org> X-Mailer: git-send-email 2.40.1 In-Reply-To: <20230528190843.514829708@linuxfoundation.org> References: <20230528190843.514829708@linuxfoundation.org> User-Agent: quilt/0.67 Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Oliver Hartkopp commit db2773d65b02aed319a93efdfb958087771d4e19 upstream. The control message provided by isotp support MSG_CMSG_COMPAT but blocked recvmsg() syscalls that have set this flag, i.e. on 32bit user space on 64 bit kernels. Link: https://github.com/hartkopp/can-isotp/issues/59 Cc: Oleksij Rempel Suggested-by: Marc Kleine-Budde Signed-off-by: Oliver Hartkopp Fixes: 42bf50a1795a ("can: isotp: support MSG_TRUNC flag when reading from socket") Link: https://lore.kernel.org/20230505110308.81087-2-mkl@pengutronix.de Cc: stable@vger.kernel.org Signed-off-by: Marc Kleine-Budde Signed-off-by: Greg Kroah-Hartman --- net/can/isotp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/net/can/isotp.c +++ b/net/can/isotp.c @@ -1016,7 +1016,7 @@ static int isotp_recvmsg(struct socket * int noblock = flags & MSG_DONTWAIT; int ret = 0; - if (flags & ~(MSG_DONTWAIT | MSG_TRUNC | MSG_PEEK)) + if (flags & ~(MSG_DONTWAIT | MSG_TRUNC | MSG_PEEK | MSG_CMSG_COMPAT)) return -EINVAL; if (!so->bound)