From: Colin King <hidden> Date: 2017-09-04 17:50:09
From: Colin Ian King <redacted>
The pointer fs_ns is assigned from inode->i_ib->s_user_ns before
a null pointer check on inode, hence if inode is actually null we
will get a null pointer dereference on this assignment. Fix this
by only dereferencing inode after the null pointer check on
inode.
Detected by CoverityScan CID#1455328 ("Dereference before null check")
Fixes: 8db6c34f1dbc ("Introduce v3 namespaced file capabilities")
Signed-off-by: Colin Ian King <redacted>
---
security/commoncap.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
--
2.14.1
--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
From: "Serge E. Hallyn" <serge@hallyn.com> Date: 2017-09-04 18:53:31
On Mon, Sep 04, 2017 at 06:50:05PM +0100, Colin King wrote:
From: Colin Ian King <redacted>
The pointer fs_ns is assigned from inode->i_ib->s_user_ns before
a null pointer check on inode, hence if inode is actually null we
will get a null pointer dereference on this assignment. Fix this
by only dereferencing inode after the null pointer check on
inode.
Detected by CoverityScan CID#1455328 ("Dereference before null check")
Fixes: 8db6c34f1dbc ("Introduce v3 namespaced file capabilities")
Signed-off-by: Colin Ian King <redacted>
--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
From: "Serge E. Hallyn" <serge@hallyn.com> Date: 2017-10-11 20:48:14
Hi James,
it doesn't look like this has been picked up yet. Assuming I'm not looking
in the wrong place, can you pull it into the security tree?
thanks,
-serge
Quoting Serge E. Hallyn (serge at hallyn.com):
On Mon, Sep 04, 2017 at 06:50:05PM +0100, Colin King wrote:
quoted
From: Colin Ian King <redacted>
The pointer fs_ns is assigned from inode->i_ib->s_user_ns before
a null pointer check on inode, hence if inode is actually null we
will get a null pointer dereference on this assignment. Fix this
by only dereferencing inode after the null pointer check on
inode.
Detected by CoverityScan CID#1455328 ("Dereference before null check")
Fixes: 8db6c34f1dbc ("Introduce v3 namespaced file capabilities")
Signed-off-by: Colin Ian King <redacted>
--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
From: James Morris <hidden> Date: 2017-10-11 23:30:51
On Wed, 11 Oct 2017, Serge E. Hallyn wrote:
Hi James,
it doesn't look like this has been picked up yet. Assuming I'm not looking
in the wrong place, can you pull it into the security tree?
Sure, Colin, can you please resend this?
Quoting Serge E. Hallyn (serge at hallyn.com):
quoted
On Mon, Sep 04, 2017 at 06:50:05PM +0100, Colin King wrote:
quoted
From: Colin Ian King <redacted>
The pointer fs_ns is assigned from inode->i_ib->s_user_ns before
a null pointer check on inode, hence if inode is actually null we
will get a null pointer dereference on this assignment. Fix this
by only dereferencing inode after the null pointer check on
inode.
Detected by CoverityScan CID#1455328 ("Dereference before null check")
Fixes: 8db6c34f1dbc ("Introduce v3 namespaced file capabilities")
Signed-off-by: Colin Ian King <redacted>
--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-security-module" in
the body of a message to majordomo at vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html