[apparmor] [patch 05/12] Fix segfault in af_unix rule processing

Seth Arnold seth.arnold at canonical.com
Wed Aug 27 00:15:16 UTC 2014


On Mon, Aug 25, 2014 at 05:06:10PM -0700, john.johansen at canonical.com wrote:
> This patch fixes a segfault that was occurring in testing over the
> weekend. The problem existed in the original patch that adds af_unix
> rules (patch 06), but this patch applies at the end of the sequence
> after the conversion from 'path' to 'addr' occurs, to simplify things a
> bit.
> 
> Signed-off-by: Steve Beattie <steve at nxnw.org>
> Acked-by: John Johansen <john.johansen at canonical.com>

Acked-by: Seth Arnold <seth.arnold at canonical.com>

Thanks

> 
> ---
>  parser/af_unix.cc |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Index: b/parser/af_unix.cc
> ===================================================================
> --- a/parser/af_unix.cc
> +++ b/parser/af_unix.cc
> @@ -83,7 +83,7 @@ void unix_rule::move_peer_conditionals(s
>  		}
>  		if (strcmp(ent->name, "addr") == 0) {
>  			move_conditional_value("unix", &peer_addr, ent);
> -			if (peer_addr[0] != '@' && strcmp(addr, "none") != 0)
> +			if (peer_addr[0] != '@' && strcmp(peer_addr, "none") != 0)
>  				yyerror("unix rule: invalid value for addr='%s'\n", peer_addr);
>  		}
>  	}
> 
> 
> -- 
> AppArmor mailing list
> AppArmor at lists.ubuntu.com
> Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/apparmor
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: Digital signature
URL: <https://lists.ubuntu.com/archives/apparmor/attachments/20140826/5ff9b125/attachment.pgp>


More information about the AppArmor mailing list