jfs: don't allow os2 xattr namespace overlap with others
commit498e200440931f271820dc523dc29b843db300da
authorDave Kleikamp <shaggy@linux.vnet.ibm.com>
Mon, 9 Aug 2010 20:57:38 +0000 (9 15:57 -0500)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 13 Aug 2010 20:27:31 +0000 (13 13:27 -0700)
treefc84d4587df57b4df072d2bff00b2e0f2d719f13
parent1dfb38cdd08308d7a382677e5861b89b3065301e
jfs: don't allow os2 xattr namespace overlap with others

commit aca0fa34bdaba39bfddddba8ca70dba4782e8fe6 upstream.

It's currently possible to bypass xattr namespace access rules by
prefixing valid xattr names with "os2.", since the os2 namespace stores
extended attributes in a legacy format with no prefix.

This patch adds checking to deny access to any valid namespace prefix
following "os2.".

Signed-off-by: Dave Kleikamp <shaggy@linux.vnet.ibm.com>
Reported-by: Sergey Vlasov <vsu@altlinux.ru>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
fs/jfs/xattr.c