)]}'
{
  "commit": "ca87a2dffbb550fc934647d5e8d1c4ae85590132",
  "tree": "d628ed3749c2816f786b7524a706270228f105ab",
  "parents": [
    "775fede6a939d7e7564d9cbb28393ef8fe15a936"
  ],
  "author": {
    "name": "Joas Antonio dos Santos",
    "email": "joasantonio108@gmail.com",
    "time": "Sat Oct 24 22:47:24 2026 -0300"
  },
  "committer": {
    "name": "Jakub Kicinski",
    "email": "kuba@kernel.org",
    "time": "Wed Oct 28 16:32:49 2026 -0700"
  },
  "message": "net: dcb: initialize PFC value before calling getpfccfg\n\ndcbnl_getpfccfg() and dcbnl_cee_fill() pass the address of an\nuninitialized stack u8 to the driver\u0027s getpfccfg() op and then put it\ninto the netlink reply unconditionally.  The op returns void, so the\ncore cannot tell whether the driver wrote the value.\n\ni40e_dcbnl_get_pfc_cfg() and ice_dcbnl_get_pfc_cfg() return without\nwriting *setting unless the DCBX agent is host managed and in CEE mode.\nBoth drivers normally run with firmware managed DCBX\n(DCB_CAP_DCBX_LLD_MANAGED), and i40e with FW LLDP disabled runs host\nmanaged in IEEE mode, so on a DCB capable i40e/ice port the PFC values\nin DCB_CMD_PFC_GCFG and DCB_CMD_CEE_GET replies, and in the CEE part of\nRTNLGRP_DCB notifications, come from uninitialized stack.  The same u8\nis reused for all eight priorities, so this is one byte per reply.\n\ndcb_doit() only requires CAP_NET_ADMIN for RTM_SETDCB, so the GET\ncommands are available to unprivileged users.\n\nSet the value to 0 before each call, like the PG config path already\npresets its outputs to DCB_ATTR_VALUE_UNDEFINED.  0 is also what the\nreply contains today on kernels built with CONFIG_INIT_STACK_ALL_ZERO,\nso nothing changes for those.\n\nFound by code inspection, compile-tested only (W\u003d1).  I don\u0027t have\ni40e/ice hardware to check the reply.\n\nFixes: b94b013eb626 (\"ice: Implement DCBNL support\")\nFixes: 5effa78e7c94 (\"i40e: Add netlink callbacks support for software based DCB\")\nSigned-off-by: Joas Antonio dos Santos \u003cjoasantonio108@gmail.com\u003e\nLink: https://patch.msgid.link/179289284460.50470.572724041164324949@gmail.com\nSigned-off-by: Jakub Kicinski \u003ckuba@kernel.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "ab71f5312876051d2d040f95673e0c4352f9f74f",
      "old_mode": 33188,
      "old_path": "net/dcb/dcbnl.c",
      "new_id": "ad0aebe0ad3d2b227beda44b09fe38e6dd4bab2d",
      "new_mode": 33188,
      "new_path": "net/dcb/dcbnl.c"
    }
  ]
}
