From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D8763C433E6 for ; Thu, 4 Mar 2021 00:34:38 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8DFCB64F25 for ; Thu, 4 Mar 2021 00:34:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346688AbhCDAee (ORCPT ); Wed, 3 Mar 2021 19:34:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232908AbhCCRY1 (ORCPT ); Wed, 3 Mar 2021 12:24:27 -0500 Received: from Chamillionaire.breakpoint.cc (Chamillionaire.breakpoint.cc [IPv6:2a0a:51c0:0:12e:520::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DCFF8C061756 for ; Wed, 3 Mar 2021 09:23:37 -0800 (PST) Received: from fw by Chamillionaire.breakpoint.cc with local (Exim 4.92) (envelope-from ) id 1lHVDk-00030S-H7; Wed, 03 Mar 2021 18:23:36 +0100 Date: Wed, 3 Mar 2021 18:23:36 +0100 From: Florian Westphal To: stable@vger.kernel.org Cc: pablo@netfilter.org, paulburton@kernel.org Subject: stable request: mips strncpy is broken Message-ID: <20210303172336.GF17911@breakpoint.cc> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org Hello, Please consider queueing commit 3c0be5849259b729580c23549330973a2dd513a2 Author: Paul Burton MIPS: Drop 32-bit asm string functions The commit is part of 5.5-rc1. We got a bug report about following nftables rule not matching even if it should on Linux 5.4.y mips32: meta iifname "br-vlan" 'iifname' uses strncpy(..., IFNAMSIZ) to copy dev->name to the register. The MIPS asm function doesn't zero-pad the remaining bytes, but that is needed for the compare op to work reliably. The reporter confirmed that this removal fixes the issue, the generic C version behaves as expected. The patch doesn't apply cleanly to 5.4, there is a minor conflict related to FORTIFY macro, but its easily resolved as all code is removed. I did not try earlier 4.4.y releases but I susepct they should also get this patch applied. I can send a 5.4.y backport if thats preferred. Thanks.