)]}'
{
  "commit": "53d72818f9e2aeb03a6053544ee6efa4eb2a3988",
  "tree": "d1ed0a7f2b4b33ec05aea5b06f194c15cff55a6a",
  "parents": [
    "87d02f3e98a86abf70441b0a0418e01cb1d64b44"
  ],
  "author": {
    "name": "Zhiyu Zhang",
    "email": "zhiyuzhang999@gmail.com",
    "time": "Thu Oct 29 01:41:36 2026 -0400"
  },
  "committer": {
    "name": "Christian Brauner",
    "email": "brauner@kernel.org",
    "time": "Fri Oct 30 15:53:44 2026 +0100"
  },
  "message": "watch_queue: keep info_id separate from rcu_head\n\nstruct watch overlays info_id with rcu_head. A notification poster reads\ninfo_id under rcu_read_lock(), but a concurrent final put can enqueue the\nwatch with call_rcu(). Enqueueing the callback writes rcu_head before the\ngrace period has elapsed, so it can corrupt info_id while the object\nremains legally visible to the reader.\n\n__post_watch_notification() then merges that value into the notification\ninfo word without masking it. Pointer bits can corrupt WATCH_INFO_LENGTH\nand make post_one_notification() copy beyond the posting task\u0027s stack\nrecord.\n\nGive info_id storage separate from rcu_head so RCU enqueueing cannot modify\nit. Place it after the kref, which uses existing tail padding on x86-64.\nMask info_id with WATCH_INFO_ID at the point of use as an additional\ninvariant check.\n\nAn unprivileged shell and keyctl reproducer was run for 30 seconds in QEMU.\nThe vulnerable baseline produced malformed notification lengths, while this\nchange completed with 288631 key notifications and no malformed record.\n\nFixes: c73be61cede5 (\"pipe: Add general notification queue support\")\nReported-by: Tong Liu \u003clyutoon@gmail.com\u003e\nReported-by: Qi Tang \u003ctpluszz77@gmail.com\u003e\nReported-by: Zhiyu Zhang \u003czhiyuzhang999@gmail.com\u003e\nCloses: https://lore.kernel.org/lkml/CALf2hKveij_sHgANY9Aktm1dPa4wfKjKNkHyp9yPbjORWFXagA@mail.gmail.com/\nLink: https://lore.kernel.org/netdev/CALf2hKvp0NPVLwr\u003da3+jUHtPohxbra8gox+aYAfWathJnn-J+Q@mail.gmail.com/\nSigned-off-by: Zhiyu Zhang \u003czhiyuzhang999@gmail.com\u003e\nLink: https://patch.msgid.link/20261029054136.1174216-1-zhiyuzhang999@gmail.com\nReviewed-by: Bradley Morgan \u003cbrads@mainlining.org\u003e\nSigned-off-by: Christian Brauner (Amutable) \u003cbrauner@kernel.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "429c7b6afeada77dc624e139a2a93fe7e47fbde8",
      "old_mode": 33188,
      "old_path": "include/linux/watch_queue.h",
      "new_id": "b87e1babb5f031a131bcb43bd1692a7519417764",
      "new_mode": 33188,
      "new_path": "include/linux/watch_queue.h"
    },
    {
      "type": "modify",
      "old_id": "932a88ac1f3954196d937c254e6801aa02800ef1",
      "old_mode": 33188,
      "old_path": "kernel/watch_queue.c",
      "new_id": "453dcf613205ab2259d6cca3171f4afab552d1d1",
      "new_mode": 33188,
      "new_path": "kernel/watch_queue.c"
    }
  ]
}
