Skip to content
GitLab
    • Why GitLab
    • Pricing
    • Contact Sales
    • Explore
  • Why GitLab
  • Pricing
  • Contact Sales
  • Explore
  • Sign in
  • Get free trial
  • AppArmorAppArmor
  • apparmor-kernelapparmor-kernel
  • Repository
  • apparmor-kernel
  • security
  • apparmor
  • policy_unpack.c
Find file Blame History Permalink
  • Mike Salvatore's avatar
    apparmor: reset pos on failure to unpack for various functions · e5049225
    Mike Salvatore authored Apr 09, 2019
    
    
    Each function that manipulates the aa_ext struct should reset it's "pos"
    member on failure. This ensures that, on failure, no changes are made to
    the state of the aa_ext struct.
    
    A bug was found in unpack_u32(), unpack_u64(), unpack_array(), and
    unpack_blob() where if the call to inbounds() fails, the pos member of
    the aa_ext struct is not reset. All of the aforementioned functions have
    been updated so that on failure the pos member of the aa_ext struct is
    reset.
    
    Signed-off-by: default avatarMike Salvatore <mike.salvatore@canonical.com>
    Acked-by: Eric Chiang's avatarEric Chiang <ericchiang@google.com>
    e5049225