)]}'
{
  "commit": "826d7ea373b5d68fa6ca2f0f158137b8e7cb7d9d",
  "tree": "4dc504ddf75507e513ba502b379a5c0bf642a34f",
  "parents": [
    "e4f3c14bf64041252ee1e65b3994c11ca60fb920"
  ],
  "author": {
    "name": "Eric Snowberg",
    "email": "eric.snowberg@oracle.com",
    "time": "Wed Jul 20 12:40:27 2022 -0400"
  },
  "committer": {
    "name": "Meena Shanmugam",
    "email": "meenashanmugam@google.com",
    "time": "Tue Aug 02 17:35:39 2022 +0000"
  },
  "message": "lockdown: Fix kexec lockdown bypass with ima policy\n\ncommit 543ce63b664e2c2f9533d089a4664b559c3e6b5b upstream.\n\nThe lockdown LSM is primarily used in conjunction with UEFI Secure Boot.\nThis LSM may also be used on machines without UEFI.  It can also be\nenabled when UEFI Secure Boot is disabled.  One of lockdown\u0027s features\nis to prevent kexec from loading untrusted kernels.  Lockdown can be\nenabled through a bootparam or after the kernel has booted through\nsecurityfs.\n\nIf IMA appraisal is used with the \"ima_appraise\u003dlog\" boot param,\nlockdown can be defeated with kexec on any machine when Secure Boot is\ndisabled or unavailable.  IMA prevents setting \"ima_appraise\u003dlog\" from\nthe boot param when Secure Boot is enabled, but this does not cover\ncases where lockdown is used without Secure Boot.\n\nTo defeat lockdown, boot without Secure Boot and add ima_appraise\u003dlog to\nthe kernel command line; then:\n\n  $ echo \"integrity\" \u003e /sys/kernel/security/lockdown\n  $ echo \"appraise func\u003dKEXEC_KERNEL_CHECK appraise_type\u003dimasig\" \u003e \\\n    /sys/kernel/security/ima/policy\n  $ kexec -ls unsigned-kernel\n\nAdd a call to verify ima appraisal is set to \"enforce\" whenever lockdown\nis enabled.  This fixes CVE-2022-21505.\n\nBUG\u003db/239715651\nTEST\u003dpresubmit\nRELEASE_NOTE\u003dFixed CVE-2022-21505 in the Linux kernel.\n\nCc: stable@vger.kernel.org\nFixes: 29d3c1c8dfe7 (\"kexec: Allow kexec_file() with appropriate IMA policy when locked down\")\nSigned-off-by: Eric Snowberg \u003ceric.snowberg@oracle.com\u003e\nAcked-by: Mimi Zohar \u003czohar@linux.ibm.com\u003e\nReviewed-by: John Haxby \u003cjohn.haxby@oracle.com\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\nSigned-off-by: Greg Kroah-Hartman \u003cgregkh@linuxfoundation.org\u003e\n\ncos-patch: security-moderate\nChange-Id: I0fc2c99b360ecb283ae2ac2d77284128b7b7e79b\nReviewed-on: https://cos-review.googlesource.com/c/third_party/kernel/+/35510\nTested-by: Cusky Presubmit Bot \u003cpresubmit@cos-infra-prod.iam.gserviceaccount.com\u003e\nReviewed-by: Robert Kolchmeyer \u003crkolchmeyer@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "e737c216efc4971133f09731ac6a3fba968c1b0e",
      "old_mode": 33188,
      "old_path": "security/integrity/ima/ima_policy.c",
      "new_id": "18569adcb4fe777a556f9949842c6aa58f656984",
      "new_mode": 33188,
      "new_path": "security/integrity/ima/ima_policy.c"
    }
  ]
}
