~apparmor-dev/apparmor/2.10

Viewing all changes in revision 3406.

  • Committer: John Johansen
  • Date: 2017-10-19 06:35:11 UTC
  • Revision ID: john.johansen@canonical.com-20171019063511-foxggzaii8251fdu
parser: Allow AF_UNSPEC family in network rules

https://launchpad.net/bugs/1546455

Don't filter out AF_UNSPEC from the list of valid protocol families so
that the parser will accept rules such as 'network unspec,'.

There are certain syscalls, such as socket(2), where the LSM hooks are
called before the protocol family is validated. In these cases, AppArmor
was emitting denials even though socket(2) will eventually fail. There
may be cases where AF_UNSPEC sockets are accepted and we need to make
sure that we're mediating those appropriately.

cherry-pick: r3376
Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Suggested-by: Steve Beattie <steve@nxnw.org>
Acked-by: John Johansen <john.johansen@canonical.com>
[cboltz: Add 'unspec' to the network domain keywords of the utils]

expand all expand all

Show diffs side-by-side

added added

removed removed

Lines of Context: