Skip to content

Commit

Permalink
Merge tag 'safesetid-bugfix-5.4' of git://github.com/micah-morton/linux
Browse files Browse the repository at this point in the history
Pull SafeSetID fix from Micah Morton:
 "Jann Horn sent some patches to fix some bugs in SafeSetID for 5.3.
  After he had done his testing there were a couple small code tweaks
  that went in and caused this bug.

  From what I can see SafeSetID is broken in 5.3 and crashes the kernel
  every time during initialization if you try to use it. I came across
  this bug when backporting Jann's changes for 5.3 to older kernels
  (4.14 and 4.19). I've tested on a Chrome OS device with those kernels
  and verified that this change fixes things.

  It doesn't seem super useful to have this bake in linux-next, since it
  is completely broken in 5.3 and nobody noticed"

* tag 'safesetid-bugfix-5.4' of git://github.com/micah-morton/linux:
  LSM: SafeSetID: Stop releasing uninitialized ruleset
  • Loading branch information
torvalds committed Sep 23, 2019
2 parents 5825a95 + 21ab858 commit 1b5fb41
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion security/safesetid/securityfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,8 @@ static ssize_t handle_policy_update(struct file *file,
out_free_buf:
kfree(buf);
out_free_pol:
release_ruleset(pol);
if (pol)
release_ruleset(pol);
return err;
}

Expand Down

0 comments on commit 1b5fb41

Please sign in to comment.