)]}'
{
  "commit": "2e90ca68b0d2f5548804f22f0dd61145516171e3",
  "tree": "257d1b16c6d565071f48d2f098f52a357f8c00d2",
  "parents": [
    "f8788d86ab28f61f7b46eb6be375f8a726783636"
  ],
  "author": {
    "name": "Linus Torvalds",
    "email": "torvalds@linux-foundation.org",
    "time": "Fri Feb 21 12:43:35 2020 -0800"
  },
  "committer": {
    "name": "Linus Torvalds",
    "email": "torvalds@linux-foundation.org",
    "time": "Mon Feb 24 11:25:33 2020 -0800"
  },
  "message": "floppy: check FDC index for errors before assigning it\n\nJordy Zomer reported a KASAN out-of-bounds read in the floppy driver in\nwait_til_ready().\n\nWhich on the face of it can\u0027t happen, since as Willy Tarreau points out,\nthe function does no particular memory access.  Except through the FDCS\nmacro, which just indexes a static allocation through teh current fdc,\nwhich is always checked against N_FDC.\n\nExcept the checking happens after we\u0027ve already assigned the value.\n\nThe floppy driver is a disgrace (a lot of it going back to my original\nhorrd \"design\"), and has no real maintainer.  Nobody has the hardware,\nand nobody really cares.  But it still gets used in virtual environment\nbecause it\u0027s one of those things that everybody supports.\n\nThe whole thing should be re-written, or at least parts of it should be\nseriously cleaned up.  The \u0027current fdc\u0027 index, which is used by the\nFDCS macro, and which is often shadowed by a local \u0027fdc\u0027 variable, is a\nprime example of how not to write code.\n\nBut because nobody has the hardware or the motivation, let\u0027s just fix up\nthe immediate problem with a nasty band-aid: test the fdc index before\nactually assigning it to the static \u0027fdc\u0027 variable.\n\nReported-by: Jordy Zomer \u003cjordy@simplyhacker.com\u003e\nCc: Willy Tarreau \u003cw@1wt.eu\u003e\nCc: Dan Carpenter \u003cdan.carpenter@oracle.com\u003e\nSigned-off-by: Linus Torvalds \u003ctorvalds@linux-foundation.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "cd3612e4e2e14317ca506e24f00c4f9a6a2f9a73",
      "old_mode": 33188,
      "old_path": "drivers/block/floppy.c",
      "new_id": "8ef65c0856407cfbf780e370bf24a5141d8938f5",
      "new_mode": 33188,
      "new_path": "drivers/block/floppy.c"
    }
  ]
}
