]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
seccomp: re-add action parse error handling
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Fri, 25 May 2018 09:44:42 +0000 (11:44 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Fri, 25 May 2018 10:08:33 +0000 (12:08 +0200)
This can happen when the 'errno' action can't parse its
supplied number.

Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
Fixes: f67c94d00a0d ("seccomp: parse_v2_rules()")
src/lxc/seccomp.c

index 057e57082cef6664a36fc28fc96fbdae65bf88b7..dcf37447f4f565a18852d086599cc4b32e84d88e 100644 (file)
@@ -257,6 +257,11 @@ static int parse_v2_rules(char *line, uint32_t def_action,
 
        /* read optional action which follows the syscall */
        rules->action = get_v2_action(tmp, def_action);
+       if (rules->action == -1) {
+               ERROR("Failed to interpret action");
+               ret = -1;
+               goto out;
+       }
 
        ret = 0;
        rules->args_num = 0;