Re: [PATCH v2] hooks: fix a missing-check bug in selinux_add_mnt_opt()

2019-05-31 Thread Gen Zhang
On Fri, May 31, 2019 at 11:55:23AM -0400, Paul Moore wrote: > On Thu, May 30, 2019 at 4:55 AM Gen Zhang wrote: > > > > In selinux_add_mnt_opt(), 'val' is allcoted by kmemdup_nul(). It returns > > NULL when fails. So 'val' should be checked. > > > > Signed-off-by: Gen Zhang > > Fixes: 757cbe597fe8

Re: [PATCH v2] hooks: fix a missing-check bug in selinux_add_mnt_opt()

2019-05-31 Thread Paul Moore
On Thu, May 30, 2019 at 4:55 AM Gen Zhang wrote: > > In selinux_add_mnt_opt(), 'val' is allcoted by kmemdup_nul(). It returns > NULL when fails. So 'val' should be checked. > > Signed-off-by: Gen Zhang > Fixes: 757cbe597fe8 ("LSM: new method: ->sb_add_mnt_opt()") Previous comments regarding "sel

[PATCH v2] hooks: fix a missing-check bug in selinux_add_mnt_opt()

2019-05-30 Thread Gen Zhang
In selinux_add_mnt_opt(), 'val' is allcoted by kmemdup_nul(). It returns NULL when fails. So 'val' should be checked. Signed-off-by: Gen Zhang Fixes: 757cbe597fe8 ("LSM: new method: ->sb_add_mnt_opt()") --- diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index 3ec702c..4797c63 10