apparmor: ensure that dfa state tables have entries
authorJohn Johansen <john.johansen@canonical.com>
Tue, 31 Mar 2020 06:37:54 +0000 (23:37 -0700)
committerJohn Johansen <john.johansen@canonical.com>
Wed, 8 Apr 2020 11:42:48 +0000 (04:42 -0700)
commitc27c6bd2c4d6b6bb779f9b722d5607993e1d5e5c
treeb7554ab191015fca33af785fc7affbf33fae7f91
parent01df52d726b5d55d2970f5c957f1961930acd5d6
apparmor: ensure that dfa state tables have entries

Currently it is possible to specify a state machine table with 0 length,
this is not valid as optional tables are specified by not defining
the table as present. Further this allows by-passing the base tables
range check against the next/check tables.

Fixes: d901d6a298dc ("apparmor: dfa split verification of table headers")
Reported-by: Mike Salvatore <mike.salvatore@canonical.com>
Signed-off-by: John Johansen <john.johansen@canonical.com>
security/apparmor/match.c