)]}'
{
  "commit": "22b37798dac451de056c0653ad600c0641da86ba",
  "tree": "ac051a3606a5dbcaaea8a9b675ccd0231fbfdee6",
  "parents": [
    "56aba769f9fb9c1fd7d17692c72c91ab84a4cf1d"
  ],
  "author": {
    "name": "Waiman Long",
    "email": "longman@redhat.com",
    "time": "Tue Aug 06 13:46:47 2024 -0400"
  },
  "committer": {
    "name": "Shuo Yang",
    "email": "gshuoy@google.com",
    "time": "Tue Sep 03 22:53:18 2024 +0000"
  },
  "message": "padata: Fix possible divide-by-0 panic in padata_mt_helper()\n\ncommit 6d45e1c948a8b7ed6ceddb14319af69424db730c upstream.\n\nWe are hit with a not easily reproducible divide-by-0 panic in padata.c at\nbootup time.\n\n  [   10.017908] Oops: divide error: 0000 1 PREEMPT SMP NOPTI\n  [   10.017908] CPU: 26 PID: 2627 Comm: kworker/u1666:1 Not tainted 6.10.0-15.el10.x86_64 #1\n  [   10.017908] Hardware name: Lenovo ThinkSystem SR950 [7X12CTO1WW]/[7X12CTO1WW], BIOS [PSE140J-2.30] 07/20/2021\n  [   10.017908] Workqueue: events_unbound padata_mt_helper\n  [   10.017908] RIP: 0010:padata_mt_helper+0x39/0xb0\n    :\n  [   10.017963] Call Trace:\n  [   10.017968]  \u003cTASK\u003e\n  [   10.018004]  ? padata_mt_helper+0x39/0xb0\n  [   10.018084]  process_one_work+0x174/0x330\n  [   10.018093]  worker_thread+0x266/0x3a0\n  [   10.018111]  kthread+0xcf/0x100\n  [   10.018124]  ret_from_fork+0x31/0x50\n  [   10.018138]  ret_from_fork_asm+0x1a/0x30\n  [   10.018147]  \u003c/TASK\u003e\n\nLooking at the padata_mt_helper() function, the only way a divide-by-0\npanic can happen is when ps-\u003echunk_size is 0.  The way that chunk_size is\ninitialized in padata_do_multithreaded(), chunk_size can be 0 when the\nmin_chunk in the passed-in padata_mt_job structure is 0.\n\nFix this divide-by-0 panic by making sure that chunk_size will be at least\n1 no matter what the input parameters are.\n\nBUG\u003db/362700975\nTEST\u003dpresubmit\nRELEASE_NOTE\u003dFixes CVE-2024-43889 in the Linux kernel\n\ncos-patch: security-moderate\nLink: https://lkml.kernel.org/r/20240806174647.1050398-1-longman@redhat.com\nFixes: 004ed42638f4 (\"padata: add basic support for multithreaded jobs\")\nChange-Id: Ib7fc2ff7391268c8d424c2800296288a7214cf9b\nSigned-off-by: Waiman Long \u003clongman@redhat.com\u003e\nCc: Daniel Jordan \u003cdaniel.m.jordan@oracle.com\u003e\nCc: Steffen Klassert \u003csteffen.klassert@secunet.com\u003e\nCc: Waiman Long \u003clongman@redhat.com\u003e\nCc: \u003cstable@vger.kernel.org\u003e\nSigned-off-by: Andrew Morton \u003cakpm@linux-foundation.org\u003e\nSigned-off-by: Greg Kroah-Hartman \u003cgregkh@linuxfoundation.org\u003e\nSigned-off-by: Anil Altinay \u003caaltinay@google.com\u003e\nReviewed-on: https://cos-review.googlesource.com/c/third_party/kernel/+/79440\nTested-by: Cusky Presubmit Bot \u003cpresubmit@cos-infra-prod.iam.gserviceaccount.com\u003e\nReviewed-by: Shuo Yang \u003cgshuoy@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "809978bb249c248e47918a6b58da2c6e908d6ce8",
      "old_mode": 33188,
      "old_path": "kernel/padata.c",
      "new_id": "7c52f9de5d4ec1a0c5f97ee57d930e4563468414",
      "new_mode": 33188,
      "new_path": "kernel/padata.c"
    }
  ]
}
