[apparmor] [Patch][parser]
John Johansen
john.johansen at canonical.com
Wed Sep 24 18:32:33 UTC 2014
Fix: Parser error when using regex profile names in IPC rules
BugLink: http://bugs.launchpad.net/bugs/1373085
The parser fails to accept certain characters, even when escaped or quoted
as part of the profile or label name in ipc rules. This is due to the
lexer not accepting those characters as part of the input pattern.
Signed-off-by: John Johansen <john.johansen at canonical.com>
---
=== modified file 'parser/parser_lex.l'
--- parser/parser_lex.l 2014-09-03 22:05:56 +0000
+++ parser/parser_lex.l 2014-09-24 18:24:06 +0000
@@ -211,9 +211,10 @@
IDS {ID}+
POST_VAR_ID_CHARS [^ \t\n"!,]{-}[=\+]
POST_VAR_ID {POST_VAR_ID_CHARS}|(,{POST_VAR_ID_CHARS})
-LIST_VALUE_ID_CHARS [^ \t\n"!,]{-}[()]
+LIST_VALUE_ID_CHARS ([^ \t\n"!,]{-}[()]|\\[ ]|\\\t|\\\"|\\!|\\,|\\\(|\\\))
+LIST_VALUE_QUOTED_ID_CHARS [^\0"]|\\\"
LIST_VALUE_ID {LIST_VALUE_ID_CHARS}+
-QUOTED_LIST_VALUE_ID {LIST_VALUE_ID}|\"{LIST_VALUE_ID}\"
+QUOTED_LIST_VALUE_ID \"{LIST_VALUE_QUOTED_ID_CHARS}+\"
ID_CHARS_NOEQ [^ \t\n"!,]{-}[=]
LEADING_ID_CHARS_NOEQ [^ \t\n"!,]{-}[=()+&]
ID_NOEQ {ID_CHARS_NOEQ}|(,{ID_CHARS_NOEQ})
More information about the AppArmor
mailing list