)]}'
{
  "commit": "fa50651ae4450032ed8565f050845935213ceebc",
  "tree": "5fd621910e197719b6b9e7da1fd5b4f31143f899",
  "parents": [
    "03a6865b96513d1f3582b628313d4ddd914c475c"
  ],
  "author": {
    "name": "Alexei Starovoitov",
    "email": "ast@kernel.org",
    "time": "Thu May 12 18:10:24 2022 -0700"
  },
  "committer": {
    "name": "COS Cherry Picker",
    "email": "cloud-image-release@prod.google.com",
    "time": "Thu Jan 09 15:11:03 2025 -0800"
  },
  "message": "bpf: Fix combination of jit blinding and pointers to bpf subprogs.\n\nThe combination of jit blinding and pointers to bpf subprogs causes:\n[   36.989548] BUG: unable to handle page fault for address: 0000000100000001\n[   36.990342] #PF: supervisor instruction fetch in kernel mode\n[   36.990968] #PF: error_code(0x0010) - not-present page\n[   36.994859] RIP: 0010:0x100000001\n[   36.995209] Code: Unable to access opcode bytes at RIP 0xffffffd7.\n[   37.004091] Call Trace:\n[   37.004351]  \u003cTASK\u003e\n[   37.004576]  ? bpf_loop+0x4d/0x70\n[   37.004932]  ? bpf_prog_3899083f75e4c5de_F+0xe3/0x13b\n\nThe jit blinding logic didn\u0027t recognize that ld_imm64 with an address\nof bpf subprogram is a special instruction and proceeded to randomize it.\nBy itself it wouldn\u0027t have been an issue, but jit_subprogs() logic\nrelies on two step process to JIT all subprogs and then JIT them\nagain when addresses of all subprogs are known.\nBlinding process in the first JIT phase caused second JIT to miss\nadjustment of special ld_imm64.\n\nFix this issue by ignoring special ld_imm64 instructions that don\u0027t have\nuser controlled constants and shouldn\u0027t be blinded.\n\nBUG\u003db/385548908\nTEST\u003dpresubmit, repro\nRELEASE_NOTE\u003dFixed a kernel crash that occurred when running some BPF\nprograms.\n\ncos-patch: bug\nFixes: 69c087ba6225 (\"bpf: Add bpf_for_each_map_elem() helper\")\nReported-by: Andrii Nakryiko \u003candrii@kernel.org\u003e\nSigned-off-by: Alexei Starovoitov \u003cast@kernel.org\u003e\nSigned-off-by: Daniel Borkmann \u003cdaniel@iogearbox.net\u003e\nAcked-by: Andrii Nakryiko \u003candrii@kernel.org\u003e\nAcked-by: Martin KaFai Lau \u003ckafai@fb.com\u003e\nLink: https://lore.kernel.org/bpf/20220513011025.13344-1-alexei.starovoitov@gmail.com\n(cherry picked from commit 4b6313cf99b0d51b49aeaea98ec76ca8161ecb80)\nSigned-off-by: Robert Kolchmeyer \u003crkolchmeyer@google.com\u003e\nChange-Id: Ib1a414caa3ff2b3cbce97e45e11c83f26caf587c\nReviewed-on: https://cos-review.googlesource.com/c/third_party/kernel/+/90059\nMain-Branch-Verified: Cusky Presubmit Bot \u003cpresubmit@cos-infra-prod.iam.gserviceaccount.com\u003e\nReviewed-by: Kevin Berry \u003ckpberry@google.com\u003e\nTested-by: Cusky Presubmit Bot \u003cpresubmit@cos-infra-prod.iam.gserviceaccount.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "f36f7b71dc07bfa510d34d5c957a0a0d98238da9",
      "old_mode": 33188,
      "old_path": "kernel/bpf/core.c",
      "new_id": "229fb01a03fe83d07891cb0a199f520a4e2b25c5",
      "new_mode": 33188,
      "new_path": "kernel/bpf/core.c"
    }
  ]
}
