)]}'
{
  "commit": "417e7ec0d61e2bcb4e264375badbd2e3c879467c",
  "tree": "7c5039d416d93cf9f2086e385ef23ee4f3f42746",
  "parents": [
    "4af1fe642f3724f1567e7c2017eeb857b08399d6"
  ],
  "author": {
    "name": "Eric Dumazet",
    "email": "edumazet@google.com",
    "time": "Sat Aug 19 03:17:07 2023 +0000"
  },
  "committer": {
    "name": "Greg Kroah-Hartman",
    "email": "gregkh@linuxfoundation.org",
    "time": "Wed Aug 30 16:11:02 2023 +0200"
  },
  "message": "ipv4: fix data-races around inet-\u003einet_id\n\n[ Upstream commit f866fbc842de5976e41ba874b76ce31710b634b5 ]\n\nUDP sendmsg() is lockless, so ip_select_ident_segs()\ncan very well be run from multiple cpus [1]\n\nConvert inet-\u003einet_id to an atomic_t, but implement\na dedicated path for TCP, avoiding cost of a locked\ninstruction (atomic_add_return())\n\nNote that this patch will cause a trivial merge conflict\nbecause we added inet-\u003eflags in net-next tree.\n\nv2: added missing change in\ndrivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_cm.c\n(David Ahern)\n\n[1]\n\nBUG: KCSAN: data-race in __ip_make_skb / __ip_make_skb\n\nread-write to 0xffff888145af952a of 2 bytes by task 7803 on cpu 1:\nip_select_ident_segs include/net/ip.h:542 [inline]\nip_select_ident include/net/ip.h:556 [inline]\n__ip_make_skb+0x844/0xc70 net/ipv4/ip_output.c:1446\nip_make_skb+0x233/0x2c0 net/ipv4/ip_output.c:1560\nudp_sendmsg+0x1199/0x1250 net/ipv4/udp.c:1260\ninet_sendmsg+0x63/0x80 net/ipv4/af_inet.c:830\nsock_sendmsg_nosec net/socket.c:725 [inline]\nsock_sendmsg net/socket.c:748 [inline]\n____sys_sendmsg+0x37c/0x4d0 net/socket.c:2494\n___sys_sendmsg net/socket.c:2548 [inline]\n__sys_sendmmsg+0x269/0x500 net/socket.c:2634\n__do_sys_sendmmsg net/socket.c:2663 [inline]\n__se_sys_sendmmsg net/socket.c:2660 [inline]\n__x64_sys_sendmmsg+0x57/0x60 net/socket.c:2660\ndo_syscall_x64 arch/x86/entry/common.c:50 [inline]\ndo_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80\nentry_SYSCALL_64_after_hwframe+0x63/0xcd\n\nread to 0xffff888145af952a of 2 bytes by task 7804 on cpu 0:\nip_select_ident_segs include/net/ip.h:541 [inline]\nip_select_ident include/net/ip.h:556 [inline]\n__ip_make_skb+0x817/0xc70 net/ipv4/ip_output.c:1446\nip_make_skb+0x233/0x2c0 net/ipv4/ip_output.c:1560\nudp_sendmsg+0x1199/0x1250 net/ipv4/udp.c:1260\ninet_sendmsg+0x63/0x80 net/ipv4/af_inet.c:830\nsock_sendmsg_nosec net/socket.c:725 [inline]\nsock_sendmsg net/socket.c:748 [inline]\n____sys_sendmsg+0x37c/0x4d0 net/socket.c:2494\n___sys_sendmsg net/socket.c:2548 [inline]\n__sys_sendmmsg+0x269/0x500 net/socket.c:2634\n__do_sys_sendmmsg net/socket.c:2663 [inline]\n__se_sys_sendmmsg net/socket.c:2660 [inline]\n__x64_sys_sendmmsg+0x57/0x60 net/socket.c:2660\ndo_syscall_x64 arch/x86/entry/common.c:50 [inline]\ndo_syscall_64+0x41/0xc0 arch/x86/entry/common.c:80\nentry_SYSCALL_64_after_hwframe+0x63/0xcd\n\nvalue changed: 0x184d -\u003e 0x184e\n\nReported by Kernel Concurrency Sanitizer on:\nCPU: 0 PID: 7804 Comm: syz-executor.1 Not tainted 6.5.0-rc6-syzkaller #0\nHardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 07/26/2023\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\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\u003d\n\nFixes: 23f57406b82d (\"ipv4: avoid using shared IP generator for connected sockets\")\nReported-by: syzbot \u003csyzkaller@googlegroups.com\u003e\nSigned-off-by: Eric Dumazet \u003cedumazet@google.com\u003e\nReviewed-by: David Ahern \u003cdsahern@kernel.org\u003e\nSigned-off-by: David S. Miller \u003cdavem@davemloft.net\u003e\nSigned-off-by: Sasha Levin \u003csashal@kernel.org\u003e\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "c2e7037c7ba1c40bd41e9d6a8d5f252cee761485",
      "old_mode": 33188,
      "old_path": "drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_cm.c",
      "new_id": "7750702900fa60b3405992e6c6c465b43abff116",
      "new_mode": 33188,
      "new_path": "drivers/net/ethernet/chelsio/inline_crypto/chtls/chtls_cm.c"
    },
    {
      "type": "modify",
      "old_id": "c8ef3b881f03d02111b89469bb878fda0379735e",
      "old_mode": 33188,
      "old_path": "include/net/inet_sock.h",
      "new_id": "c2432c2addc82c99efabc2858d587f0cb6228e18",
      "new_mode": 33188,
      "new_path": "include/net/inet_sock.h"
    },
    {
      "type": "modify",
      "old_id": "530e7257e4389ba86112e25da454017cc5ca7ce6",
      "old_mode": 33188,
      "old_path": "include/net/ip.h",
      "new_id": "1872f570abeda74066dc6f7c73fb98952622f675",
      "new_mode": 33188,
      "new_path": "include/net/ip.h"
    },
    {
      "type": "modify",
      "old_id": "b780827f5e0a5b4296e1e6a2e78dbd7f111d3402",
      "old_mode": 33188,
      "old_path": "net/dccp/ipv4.c",
      "new_id": "bfececa9e244e2c5e2b0bd3c67810e225311c71f",
      "new_mode": 33188,
      "new_path": "net/dccp/ipv4.c"
    },
    {
      "type": "modify",
      "old_id": "ebb737ac9e894997d5f8d8da876bc2414b7d2f4f",
      "old_mode": 33188,
      "old_path": "net/ipv4/af_inet.c",
      "new_id": "04853c83c85c4b9e1c49408cf1244bfc8e21baa6",
      "new_mode": 33188,
      "new_path": "net/ipv4/af_inet.c"
    },
    {
      "type": "modify",
      "old_id": "4d1af0cd7d99e3f76a4202a91e2a4f5869e9aa2f",
      "old_mode": 33188,
      "old_path": "net/ipv4/datagram.c",
      "new_id": "cb5dbee9e018fbba1bc1e5705e8bec6c4203af56",
      "new_mode": 33188,
      "new_path": "net/ipv4/datagram.c"
    },
    {
      "type": "modify",
      "old_id": "08921b96f9728669ef591de1822483ab4a132514",
      "old_mode": 33188,
      "old_path": "net/ipv4/tcp_ipv4.c",
      "new_id": "f9b8a4a1d2edc10fe39077258347d2d6409f5cbb",
      "new_mode": 33188,
      "new_path": "net/ipv4/tcp_ipv4.c"
    },
    {
      "type": "modify",
      "old_id": "83656fe03a0e6cf28e295b5f96ca616652c8f743",
      "old_mode": 33188,
      "old_path": "net/sctp/socket.c",
      "new_id": "a11b0d903514cecbd1b72dff540638dd53f3ea57",
      "new_mode": 33188,
      "new_path": "net/sctp/socket.c"
    }
  ]
}
