All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
Cc: linux-security-module@vger.kernel.org
Subject: Re: [PATCH] smackfs: fix IPv6 netlabel prefix mask for non-16-aligned lengths
Date: Tue, 22 Sep 2026 14:57:36 +0000	[thread overview]
Message-ID: <20260922145736.6A2AE1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <A82C90B4956EE3A9+20260922144738.9594-1-daihongjian@kylinsec.com.cn>

> smk_write_net6addr() builds the partial-word mask as (1 << m) - 1,
> which keeps the low m bits instead of the high m bits (e.g. /33
> yields 0x0001 instead of 0x8000), and stores it without htons()
> while the address words are in network byte order. Any prefix with
> mask % 16 != 0 is truncated to the wrong network and mislabeled.
> 
> Take the high m bits and convert to network byte order, matching
> how newname words are stored with htons().
> 
> Fixes: 21abb1ec414c ("Smack: IPv6 host labeling")

Sashiko has reviewed this patch and found no issues. It looks great!

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/A82C90B4956EE3A9+20260922144738.9594-1-daihongjian@kylinsec.com.cn?part=1


      reply	other threads:[~2026-09-22 14:57 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-22 14:47 [PATCH] smackfs: fix IPv6 netlabel prefix mask for non-16-aligned lengths Hongjian Dai
2026-09-22 14:57 ` sashiko-bot [this message]

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=20260922145736.6A2AE1F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.