linux-stable/security/smack
Tetsuo Handa cbd87ba6a1 smackfs: restrict bytes count in smk_set_cipso()
commit 49ec114a6e upstream.

Oops, I failed to update subject line.

From 07571157c91b98ce1a4aa70967531e64b78e8346 Mon Sep 17 00:00:00 2001
From: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Date: Mon, 12 Apr 2021 22:25:06 +0900
Subject: smackfs: restrict bytes count in smk_set_cipso()

Commit 7ef4c19d24 ("smackfs: restrict bytes count in smackfs write
functions") missed that count > SMK_CIPSOMAX check applies to only
format == SMK_FIXED24_FMT case.

Reported-by: syzbot <syzbot+77c53db50c9fff774e8e@syzkaller.appspotmail.com>
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Casey Schaufler <casey@schaufler-ca.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-20 16:16:06 +02:00
..
Kconfig Smack: Signal delivery as an append operation 2016-09-08 13:22:56 -07:00
Makefile
smack.h Smack: Privilege check on key operations 2018-01-10 09:29:14 -08:00
smack_access.c LSM: generalize flag passing to security_capable 2020-01-23 08:21:29 +01:00
smack_lsm.c smack: use GFP_NOFS while holding inode_smack::smk_lock 2019-10-07 18:57:27 +02:00
smack_netfilter.c netfilter: nf_hook_ops structs can be const 2017-07-31 19:10:44 +02:00
smackfs.c smackfs: restrict bytes count in smk_set_cipso() 2021-07-20 16:16:06 +02:00