public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Florian Westphal <fw@strlen.de>
To: stable@vger.kernel.org
Cc: pablo@netfilter.org, paulburton@kernel.org
Subject: stable request: mips strncpy is broken
Date: Wed, 3 Mar 2021 18:23:36 +0100	[thread overview]
Message-ID: <20210303172336.GF17911@breakpoint.cc> (raw)

Hello,

Please consider queueing

commit 3c0be5849259b729580c23549330973a2dd513a2
Author: Paul Burton <paulburton@kernel.org>
 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.

             reply	other threads:[~2021-03-04  0:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-03 17:23 Florian Westphal [this message]
2021-03-04 13:26 ` stable request: mips strncpy is broken Greg KH
2021-03-04 13:43   ` Florian Westphal

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210303172336.GF17911@breakpoint.cc \
    --to=fw@strlen.de \
    --cc=pablo@netfilter.org \
    --cc=paulburton@kernel.org \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox