)]}'
{
  "commit": "b368a780211dc4f7460285f2ca4bdad2ce0dfdad",
  "tree": "b431a17a793803a1c85b280c63f42d6782007258",
  "parents": [
    "803904cbc335a197bf64d54d5ada7117982c6df9"
  ],
  "author": {
    "name": "Gwangun Jung",
    "email": "exsociety@gmail.com",
    "time": "Thu Apr 13 19:35:54 2023 +0900"
  },
  "committer": {
    "name": "Oleksandr Tymoshenko",
    "email": "ovt@google.com",
    "time": "Fri Apr 28 17:08:48 2023 +0000"
  },
  "message": "net: sched: sch_qfq: prevent slab-out-of-bounds in qfq_activate_agg\n\n[ Upstream commit 3037933448f60f9acb705997eae62013ecb81e0d ]\n\nIf the TCA_QFQ_LMAX value is not offered through nlattr, lmax is determined by the MTU value of the network device.\nThe MTU of the loopback device can be set up to 2^31-1.\nAs a result, it is possible to have an lmax value that exceeds QFQ_MIN_LMAX.\n\nDue to the invalid lmax value, an index is generated that exceeds the QFQ_MAX_INDEX(\u003d24) value, causing out-of-bounds read/write errors.\n\nThe following reports a oob access:\n\n[   84.582666] BUG: KASAN: slab-out-of-bounds in qfq_activate_agg.constprop.0 (net/sched/sch_qfq.c:1027 net/sched/sch_qfq.c:1060 net/sched/sch_qfq.c:1313)\n[   84.583267] Read of size 4 at addr ffff88810f676948 by task ping/301\n[   84.583686]\n[   84.583797] CPU: 3 PID: 301 Comm: ping Not tainted 6.3.0-rc5 #1\n[   84.584164] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014\n[   84.584644] Call Trace:\n[   84.584787]  \u003cTASK\u003e\n[   84.584906] dump_stack_lvl (lib/dump_stack.c:107 (discriminator 1))\n[   84.585108] print_report (mm/kasan/report.c:320 mm/kasan/report.c:430)\n[   84.585570] kasan_report (mm/kasan/report.c:538)\n[   84.585988] qfq_activate_agg.constprop.0 (net/sched/sch_qfq.c:1027 net/sched/sch_qfq.c:1060 net/sched/sch_qfq.c:1313)\n[   84.586599] qfq_enqueue (net/sched/sch_qfq.c:1255)\n[   84.587607] dev_qdisc_enqueue (net/core/dev.c:3776)\n[   84.587749] __dev_queue_xmit (./include/net/sch_generic.h:186 net/core/dev.c:3865 net/core/dev.c:4212)\n[   84.588763] ip_finish_output2 (./include/net/neighbour.h:546 net/ipv4/ip_output.c:228)\n[   84.589460] ip_output (net/ipv4/ip_output.c:430)\n[   84.590132] ip_push_pending_frames (./include/net/dst.h:444 net/ipv4/ip_output.c:126 net/ipv4/ip_output.c:1586 net/ipv4/ip_output.c:1606)\n[   84.590285] raw_sendmsg (net/ipv4/raw.c:649)\n[   84.591960] sock_sendmsg (net/socket.c:724 net/socket.c:747)\n[   84.592084] __sys_sendto (net/socket.c:2142)\n[   84.593306] __x64_sys_sendto (net/socket.c:2150)\n[   84.593779] do_syscall_64 (arch/x86/entry/common.c:50 arch/x86/entry/common.c:80)\n[   84.593902] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:120)\n[   84.594070] RIP: 0033:0x7fe568032066\n[   84.594192] Code: 0e 0d 00 f7 d8 64 89 02 48 c7 c0 ff ff ff ff eb b8 0f 1f 00 41 89 ca 64 8b 04 25 18 00 00 00 85 c09[ 84.594796] RSP: 002b:00007ffce388b4e8 EFLAGS: 00000246 ORIG_RAX: 000000000000002c\n\nCode starting with the faulting instruction\n\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n[   84.595047] RAX: ffffffffffffffda RBX: 00007ffce388cc70 RCX: 00007fe568032066\n[   84.595281] RDX: 0000000000000040 RSI: 00005605fdad6d10 RDI: 0000000000000003\n[   84.595515] RBP: 00005605fdad6d10 R08: 00007ffce388eeec R09: 0000000000000010\n[   84.595749] R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000040\n[   84.595984] R13: 00007ffce388cc30 R14: 00007ffce388b4f0 R15: 0000001d00000001\n[   84.596218]  \u003c/TASK\u003e\n[   84.596295]\n[   84.596351] Allocated by task 291:\n[   84.596467] kasan_save_stack (mm/kasan/common.c:46)\n[   84.596597] kasan_set_track (mm/kasan/common.c:52)\n[   84.596725] __kasan_kmalloc (mm/kasan/common.c:384)\n[   84.596852] __kmalloc_node (./include/linux/kasan.h:196 mm/slab_common.c:967 mm/slab_common.c:974)\n[   84.596979] qdisc_alloc (./include/linux/slab.h:610 ./include/linux/slab.h:731 net/sched/sch_generic.c:938)\n[   84.597100] qdisc_create (net/sched/sch_api.c:1244)\n[   84.597222] tc_modify_qdisc (net/sched/sch_api.c:1680)\n[   84.597357] rtnetlink_rcv_msg (net/core/rtnetlink.c:6174)\n[   84.597495] netlink_rcv_skb (net/netlink/af_netlink.c:2574)\n[   84.597627] netlink_unicast (net/netlink/af_netlink.c:1340 net/netlink/af_netlink.c:1365)\n[   84.597759] netlink_sendmsg (net/netlink/af_netlink.c:1942)\n[   84.597891] sock_sendmsg (net/socket.c:724 net/socket.c:747)\n[   84.598016] ____sys_sendmsg (net/socket.c:2501)\n[   84.598147] ___sys_sendmsg (net/socket.c:2557)\n[   84.598275] __sys_sendmsg (./include/linux/file.h:31 net/socket.c:2586)\n[   84.598399] do_syscall_64 (arch/x86/entry/common.c:50 arch/x86/entry/common.c:80)\n[   84.598520] entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:120)\n[   84.598688]\n[   84.598744] The buggy address belongs to the object at ffff88810f674000\n[   84.598744]  which belongs to the cache kmalloc-8k of size 8192\n[   84.599135] The buggy address is located 2664 bytes to the right of\n[   84.599135]  allocated 7904-byte region [ffff88810f674000, ffff88810f675ee0)\n[   84.599544]\n[   84.599598] The buggy address belongs to the physical page:\n[   84.599777] page:00000000e638567f refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x10f670\n[   84.600074] head:00000000e638567f order:3 entire_mapcount:0 nr_pages_mapped:0 pincount:0\n[   84.600330] flags: 0x200000000010200(slab|head|node\u003d0|zone\u003d2)\n[   84.600517] raw: 0200000000010200 ffff888100043180 dead000000000122 0000000000000000\n[   84.600764] raw: 0000000000000000 0000000080020002 00000001ffffffff 0000000000000000\n[   84.601009] page dumped because: kasan: bad access detected\n[   84.601187]\n[   84.601241] Memory state around the buggy address:\n[   84.601396]  ffff88810f676800: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc\n[   84.601620]  ffff88810f676880: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc\n[   84.601845] \u003effff88810f676900: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc\n[   84.602069]                                               ^\n[   84.602243]  ffff88810f676980: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc\n[   84.602468]  ffff88810f676a00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc\n[   84.602693] \u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n[   84.602924] Disabling lock debugging due to kernel taint\n\nBUG\u003db/279432131,b/279506822\nTEST\u003dpresubmit,validation\nRELEASE_NOTE\u003dNone\n\nFixes: 3015f3d2a3cd (\"pkt_sched: enable QFQ to support TSO/GSO\")\nReported-by: Gwangun Jung \u003cexsociety@gmail.com\u003e\nSigned-off-by: Gwangun Jung \u003cexsociety@gmail.com\u003e\nAcked-by: Jamal Hadi Salim\u003cjhs@mojatatu.com\u003e\nSigned-off-by: David S. Miller \u003cdavem@davemloft.net\u003e\nSigned-off-by: Sasha Levin \u003csashal@kernel.org\u003e\nChange-Id: Ibe22f775a5cb88b53565f5a5d106de92d95a9770\nReviewed-on: https://cos-review.googlesource.com/c/third_party/kernel/+/48349\nTested-by: Cusky Presubmit Bot \u003cpresubmit@cos-infra-prod.iam.gserviceaccount.com\u003e\nReviewed-by: Meena Shanmugam \u003cmeenashanmugam@google.com\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "1d1d81aeb389f495f1cae1c91284db881cd79d6f",
      "old_mode": 33188,
      "old_path": "net/sched/sch_qfq.c",
      "new_id": "cad7deacf60a49d316cf60d239b215c91b9feee9",
      "new_mode": 33188,
      "new_path": "net/sched/sch_qfq.c"
    }
  ]
}
