All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] xattr: Fail with -EINVAL for NULL attribute names
@ 2016-04-13 12:57 Andreas Gruenbacher
  2016-04-13 15:40 ` [PATCH] xattr: Export xattr_resolve_name Andreas Gruenbacher
  0 siblings, 1 reply; 64+ messages in thread
From: Andreas Gruenbacher @ 2016-04-13 12:57 UTC (permalink / raw)
  To: Alexander Viro; +Cc: Andreas Gruenbacher, linux-fsdevel, Miklos Szeredi

Commit 98e9cb57 improved the xattr name checks in xattr_resolve_name but
didn't update the NULL attribute name check appropriately, so NULL
attribute names lead to NULL pointer dereferences.  Turn that into
-EINVAL results instead.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
---
 fs/xattr.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/xattr.c b/fs/xattr.c
index 4861322..1515fe9 100644
--- a/fs/xattr.c
+++ b/fs/xattr.c
@@ -668,7 +668,7 @@ xattr_resolve_name(const struct xattr_handler **handlers, const char **name)
 	const struct xattr_handler *handler;
 
 	if (!*name)
-		return NULL;
+		return ERR_PTR(-EINVAL);
 
 	for_each_xattr_handler(handlers, handler) {
 		const char *n;
-- 
2.5.5


^ permalink raw reply related	[flat|nested] 64+ messages in thread

end of thread, other threads:[~2016-04-15  3:01 UTC | newest]

Thread overview: 64+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-13 12:57 [PATCH] xattr: Fail with -EINVAL for NULL attribute names Andreas Gruenbacher
2016-04-13 15:40 ` [PATCH] xattr: Export xattr_resolve_name Andreas Gruenbacher
2016-04-13 18:20   ` Al Viro
     [not found]     ` <20160413182026.GR25498-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org>
2016-04-13 22:27       ` Andreas Gruenbacher
2016-04-13 22:27         ` [Cluster-devel] " Andreas Gruenbacher
2016-04-13 22:27         ` Andreas Gruenbacher
     [not found]       ` <1460586466-5518-1-git-send-email-agruenba-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-04-13 22:27         ` [PATCH 2/8] cifs: Check for equality with ACL_TYPE_ACCESS and ACL_TYPE_DEFAULT Andreas Gruenbacher
2016-04-13 22:27           ` [Cluster-devel] " Andreas Gruenbacher
2016-04-13 22:27           ` Andreas Gruenbacher
2016-04-13 22:27         ` [PATCH 3/8] cifs: Fix removexattr for os2.* xattrs Andreas Gruenbacher
2016-04-13 22:27           ` [Cluster-devel] " Andreas Gruenbacher
2016-04-13 22:27           ` Andreas Gruenbacher
2016-04-13 22:27         ` [PATCH 6/8] ceph: kill __ceph_removexattr() Andreas Gruenbacher
2016-04-13 22:27           ` [Cluster-devel] " Andreas Gruenbacher
2016-04-13 22:27           ` Andreas Gruenbacher
2016-04-13 22:30       ` [PATCH] xattr: Export xattr_resolve_name Andreas Gruenbacher
2016-04-13 22:30         ` [Cluster-devel] " Andreas Gruenbacher
     [not found]       ` <1460586620-5717-1-git-send-email-agruenba-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-04-13 22:30         ` [PATCH 1/8] cifs: Fix xattr name checks Andreas Gruenbacher
2016-04-13 22:30           ` [Cluster-devel] " Andreas Gruenbacher
     [not found]           ` <1460586620-5717-2-git-send-email-agruenba-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-04-14  4:26             ` Steve French
2016-04-14  4:26               ` [Cluster-devel] " Steve French
     [not found]               ` <CAH2r5mumJ22+Q0bASFcXp5fK39Ubh+sznfOpVUtSJ94_c5gkxA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-04-14  4:37                 ` Al Viro
2016-04-14  4:37                   ` [Cluster-devel] " Al Viro
2016-04-14  4:43                   ` Steve French
2016-04-14  4:43                     ` [Cluster-devel] " Steve French
     [not found]                     ` <CAH2r5ms6USEO3a_EPUpgsnvTZgSHB2QqJnUnCSCQdFmvV0yPDg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2016-04-14  4:49                       ` Steve French
2016-04-14  4:49                         ` [Cluster-devel] " Steve French
2016-04-14  4:59                       ` Al Viro
2016-04-14  4:59                         ` [Cluster-devel] " Al Viro
     [not found]                         ` <20160414045920.GT25498-3bDd1+5oDREiFSDQTTA3OLVCufUGDwFn@public.gmane.org>
2016-04-15  3:01                           ` Steve French
2016-04-15  3:01                             ` [Cluster-devel] " Steve French
2016-04-13 22:30         ` [PATCH 3/8] cifs: Fix removexattr for os2.* xattrs Andreas Gruenbacher
2016-04-13 22:30           ` [Cluster-devel] " Andreas Gruenbacher
     [not found]           ` <1460586620-5717-4-git-send-email-agruenba-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2016-04-14  4:27             ` Steve French
2016-04-14  4:27               ` [Cluster-devel] " Steve French
2016-04-13 22:30         ` [PATCH 8/8] gfs2: Switch to generic xattr handlers Andreas Gruenbacher
2016-04-13 22:30           ` [Cluster-devel] " Andreas Gruenbacher
2016-04-13 22:27     ` [PATCH 1/8] cifs: Fix xattr name checks Andreas Gruenbacher
2016-04-13 22:27       ` [Cluster-devel] " Andreas Gruenbacher
2016-04-13 22:27       ` Andreas Gruenbacher
2016-04-13 22:27     ` [PATCH 4/8] ceph: Get rid of d_find_alias in ceph_set_acl Andreas Gruenbacher
2016-04-13 22:27       ` [Cluster-devel] " Andreas Gruenbacher
2016-04-13 22:27       ` Andreas Gruenbacher
2016-04-13 22:27     ` [PATCH 5/8] ceph: Switch to generic xattr handlers Andreas Gruenbacher
2016-04-13 22:27       ` [Cluster-devel] " Andreas Gruenbacher
2016-04-13 22:27       ` Andreas Gruenbacher
2016-04-13 22:27     ` [PATCH 7/8] posix acls: Export xattr_handler functions Andreas Gruenbacher
2016-04-13 22:27       ` [Cluster-devel] " Andreas Gruenbacher
2016-04-13 22:27       ` Andreas Gruenbacher
2016-04-13 22:27     ` [PATCH 8/8] gfs2: Switch to generic xattr handlers Andreas Gruenbacher
2016-04-13 22:27       ` [Cluster-devel] " Andreas Gruenbacher
2016-04-13 22:27       ` Andreas Gruenbacher
2016-04-13 22:30     ` [PATCH 2/8] cifs: Check for equality with ACL_TYPE_ACCESS and ACL_TYPE_DEFAULT Andreas Gruenbacher
2016-04-13 22:30       ` [Cluster-devel] " Andreas Gruenbacher
2016-04-14  4:26       ` Steve French
2016-04-14  4:26         ` [Cluster-devel] " Steve French
2016-04-13 22:30     ` [PATCH 4/8] ceph: Get rid of d_find_alias in ceph_set_acl Andreas Gruenbacher
2016-04-13 22:30       ` [Cluster-devel] " Andreas Gruenbacher
2016-04-13 22:30     ` [PATCH 5/8] ceph: Switch to generic xattr handlers Andreas Gruenbacher
2016-04-13 22:30       ` [Cluster-devel] " Andreas Gruenbacher
2016-04-13 22:30     ` [PATCH 6/8] ceph: kill __ceph_removexattr() Andreas Gruenbacher
2016-04-13 22:30       ` [Cluster-devel] " Andreas Gruenbacher
2016-04-13 22:30     ` [PATCH 7/8] posix acls: Export xattr_handler functions Andreas Gruenbacher
2016-04-13 22:30       ` [Cluster-devel] " Andreas Gruenbacher

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.