)]}'
{
  "commit": "45ad90ef15d53f2f4e56736e048d3ee55ece007c",
  "tree": "c695ea25d892cf18b989bb8ba0557bba565bdbdf",
  "parents": [
    "9183a235f5b5b90038b0c3f3d5fe63bea29419f8"
  ],
  "author": {
    "name": "Ignat Korchagin",
    "email": "ignat@cloudflare.com",
    "time": "Thu Oct 03 18:01:51 2024 +0100"
  },
  "committer": {
    "name": "Kevin Berry",
    "email": "kpberry@google.com",
    "time": "Thu Dec 12 10:24:58 2024 -0800"
  },
  "message": "net: explicitly clear the sk pointer, when pf-\u003ecreate fails\n\ncommit 631083143315d1b192bd7d915b967b37819e88ea upstream.\n\nWe have recently noticed the exact same KASAN splat as in commit\n6cd4a78d962b (\"net: do not leave a dangling sk pointer, when socket\ncreation fails\"). The problem is that commit did not fully address the\nproblem, as some pf-\u003ecreate implementations do not use sk_common_release\nin their error paths.\n\nFor example, we can use the same reproducer as in the above commit, but\nchanging ping to arping. arping uses AF_PACKET socket and if packet_create\nfails, it will just sk_free the allocated sk object.\n\nWhile we could chase all the pf-\u003ecreate implementations and make sure they\nNULL the freed sk object on error from the socket, we can\u0027t guarantee\nfuture protocols will not make the same mistake.\n\nSo it is easier to just explicitly NULL the sk pointer upon return from\npf-\u003ecreate in __sock_create. We do know that pf-\u003ecreate always releases the\nallocated sk object on error, so if the pointer is not NULL, it is\ndefinitely dangling.\n\nBUG\u003db/383287283\nTEST\u003dpresubmit\nRELEASE_NOTE\u003dFixed CVE-2024-50186 in the Linux kernel.\n\ncos-patch: security-high\nFixes: 6cd4a78d962b (\"net: do not leave a dangling sk pointer, when socket creation fails\")\nChange-Id: I26e6673877738ad12063c15e438c731aac346744\nSigned-off-by: Ignat Korchagin \u003cignat@cloudflare.com\u003e\nCc: stable@vger.kernel.org\nReviewed-by: Eric Dumazet \u003cedumazet@google.com\u003e\nLink: https://patch.msgid.link/20241003170151.69445-1-ignat@cloudflare.com\nSigned-off-by: Jakub Kicinski \u003ckuba@kernel.org\u003e\nSigned-off-by: Greg Kroah-Hartman \u003cgregkh@linuxfoundation.org\u003e\nSigned-off-by: Kevin Berry \u003ckpberry@google.com\u003e\nReviewed-on: https://cos-review.googlesource.com/c/third_party/kernel/+/88261\nTested-by: Cusky Presubmit Bot \u003cpresubmit@cos-infra-prod.iam.gserviceaccount.com\u003e\nReviewed-by: Anil Altinay \u003caaltinay@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "9db33cd4a71b895a93569102b113e734907ec590",
      "old_mode": 33188,
      "old_path": "net/socket.c",
      "new_id": "bad58f23f307229e398354efc0024f058e843eb0",
      "new_mode": 33188,
      "new_path": "net/socket.c"
    }
  ]
}
