[PATCH] tomoyo: Add a kernel config option for fuzzing testing.
penguin-kernel at i-love.sakura.ne.jp
Wed Mar 13 10:29:12 UTC 2019
On 2019/03/13 6:24, James Morris wrote:
> On Wed, 13 Mar 2019, Tetsuo Handa wrote:
>>> I don't understand the logic here. If the cause of this is no policy
>>> loaded combined with running out of memory, shouldn't the no-policy issue
>>> be dealt with earlier?
>> This patch is for automatically loading minimal policy at boot time
>> in order to address the no-policy issue. By applying this patch, syzbot
>> can test TOMOYO module without modifying userspace to load TOMOYO's policy
>> when /sbin/init starts.
> If syzbot is trying to test Tomoyo and this requires policy to be loaded,
> shouldn't it do that?
SELinux has disabled/permissive/enforcing modes.
And syzbot is testing SELinux in permissive mode, isn't it?
TOMOYO has disabled/learning/permissive/enforcing modes.
And syzbot will test TOMOYO in learning mode.
This patch is required for telling TOMOYO to run in learning mode, by
loading minimal policy, without asking userspace to run policy loader.
This patch is easier than asking syzbot users to update their filesystem
images in order to embed policy loader and minimal policy into their
> And again, I think the no-policy situation needs to be detected before
> you start trying to apply memory policies to running processes. Surely
> there is some much earlier point during initialization that you will
> detect that there is no policy?
TOMOYO is already detecting no-policy situation. TOMOYO is calling panic()
due to "memory allocation failure before loading minimal policy".
This patch avoids panic() by automatically loading minimal policy which is
embedded into the kernel.
More information about the Linux-security-module-archive