ci2 starts bisection 2023-12-15 07:47:13.037676615 +0000 UTC m=+131396.026253433 bisecting fixing commit since fb2635ac69abac0060cc2be2873dc4f524f12e66 building syzkaller on d80eec66c939240cfc674221138f637197659116 ensuring issue is reproducible on original commit fb2635ac69abac0060cc2be2873dc4f524f12e66 testing commit fb2635ac69abac0060cc2be2873dc4f524f12e66 gcc compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 0c6e3d0237639aa4c2b3bb5b72616fa417eab6f4d7d25271da98177818b4ae97 run #0: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #1: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #2: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #3: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #4: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #5: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #6: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #7: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #8: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #9: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #10: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #11: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #12: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #13: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #14: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #15: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #16: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #17: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #18: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #19: crashed: KASAN: use-after-free Read in unix_stream_read_actor representative crash: KASAN: use-after-free Read in __skb_datagram_iter, types: [KASAN] check whether we can drop unnecessary instrumentation disabling configs for [ATOMIC_SLEEP HANG LEAK UBSAN BUG LOCKDEP], they are not needed testing commit fb2635ac69abac0060cc2be2873dc4f524f12e66 gcc compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 606afbbaf8699e8cad0ec460f86e20a18c055505a43bf61615c2ec2f64b60c55 run #0: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #1: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #2: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #3: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #4: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #5: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #6: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #7: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #8: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #9: crashed: KASAN: use-after-free Read in unix_stream_read_actor representative crash: KASAN: use-after-free Read in unix_stream_read_actor, types: [KASAN] the bug reproduces without the instrumentation disabling configs for [HANG LEAK UBSAN BUG LOCKDEP ATOMIC_SLEEP], they are not needed kconfig minimization: base=3820 full=7526 leaves diff=1996 split chunks (needed=false): <1996> split chunk #0 of len 1996 into 5 parts testing without sub-chunk 1/5 disabling configs for [BUG LOCKDEP ATOMIC_SLEEP HANG LEAK UBSAN], they are not needed testing commit fb2635ac69abac0060cc2be2873dc4f524f12e66 gcc compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 81b6f876130947c3d68d664c15fc9bc5ce440050e75e5cca2641f1808555755d run #0: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #1: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #2: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #3: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #4: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #5: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #6: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #7: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #8: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #9: crashed: KASAN: use-after-free Read in unix_stream_read_actor representative crash: KASAN: use-after-free Read in unix_stream_read_actor, types: [KASAN] the chunk can be dropped testing without sub-chunk 2/5 disabling configs for [HANG LEAK UBSAN BUG LOCKDEP ATOMIC_SLEEP], they are not needed testing commit fb2635ac69abac0060cc2be2873dc4f524f12e66 gcc compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: f2a12fe95e633a88aa8d190a5087114ac0ccdc222e5f7760d5b6e7c4f9c78d2c run #0: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #1: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #2: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #3: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #4: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #5: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #6: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #7: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #8: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #9: crashed: KASAN: use-after-free Read in unix_stream_read_actor representative crash: KASAN: use-after-free Read in __skb_datagram_iter, types: [KASAN] the chunk can be dropped testing without sub-chunk 3/5 disabling configs for [LOCKDEP ATOMIC_SLEEP HANG LEAK UBSAN BUG], they are not needed testing commit fb2635ac69abac0060cc2be2873dc4f524f12e66 gcc compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: a2706ac174c1804e5319e702cfb25e4a79ba10bb85d77733bb134a1c7df7e143 all runs: crashed: KASAN: use-after-free Read in unix_stream_read_actor representative crash: KASAN: use-after-free Read in unix_stream_read_actor, types: [KASAN] the chunk can be dropped testing without sub-chunk 4/5 disabling configs for [ATOMIC_SLEEP HANG LEAK UBSAN BUG LOCKDEP], they are not needed testing commit fb2635ac69abac0060cc2be2873dc4f524f12e66 gcc compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 20bc1f0a24b5022b6e9f906eaa5a135166d1c06840a8dd9df0e9418715475eab run #0: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #1: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #2: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #3: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #4: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #5: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #6: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #7: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #8: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #9: crashed: KASAN: use-after-free Read in unix_stream_read_actor representative crash: KASAN: use-after-free Read in __skb_datagram_iter, types: [KASAN] the chunk can be dropped testing without sub-chunk 5/5 disabling configs for [ATOMIC_SLEEP HANG LEAK UBSAN BUG LOCKDEP], they are not needed testing commit fb2635ac69abac0060cc2be2873dc4f524f12e66 gcc compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 0cd986673ace3c7c9fc6d1129edcfe12c465a07a350f15de8598b333c66debce run #0: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #1: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #2: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #3: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #4: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #5: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #6: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #7: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #8: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #9: crashed: KASAN: use-after-free Read in __skb_datagram_iter representative crash: KASAN: use-after-free Read in __skb_datagram_iter, types: [KASAN] the chunk can be dropped disabling configs for [ATOMIC_SLEEP HANG LEAK UBSAN BUG LOCKDEP], they are not needed testing current HEAD ba6f5fb465114fcd48ddb2c7a7740915b2289d6b testing commit ba6f5fb465114fcd48ddb2c7a7740915b2289d6b gcc compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: d74eb5d6b8fe738cd2845fbd10691d1570815d5b5b0960e8f0e83e411b860608 all runs: OK false negative chance: 0.000 # git bisect start ba6f5fb465114fcd48ddb2c7a7740915b2289d6b fb2635ac69abac0060cc2be2873dc4f524f12e66 Bisecting: 571 revisions left to test after this (roughly 9 steps) [f0f3328af912d95046110602edddb3b4bdde059e] mm/damon/sysfs: update monitoring target regions for online input commit determine whether the revision contains the guilty commit revision fb2635ac69abac0060cc2be2873dc4f524f12e66 crashed and is reachable testing commit f0f3328af912d95046110602edddb3b4bdde059e gcc compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 0da6757dca62cebc7d077b582d1d95e24a083bf7785d5e71d3fd751a4a3ea8aa all runs: OK false negative chance: 0.000 # git bisect bad f0f3328af912d95046110602edddb3b4bdde059e Bisecting: 285 revisions left to test after this (roughly 8 steps) [8979ed70da2f30baadc706056744d171ba43c249] interconnect: move ignore_list out of of_count_icc_providers() determine whether the revision contains the guilty commit revision fb2635ac69abac0060cc2be2873dc4f524f12e66 crashed and is reachable testing commit 8979ed70da2f30baadc706056744d171ba43c249 gcc compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: bdc07434a55416844b285627aad129ac840e75b284d5e5af6c4e6e44f9ec1dec run #0: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #1: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #2: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #3: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #4: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #5: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #6: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #7: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #8: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #9: crashed: KASAN: use-after-free Read in __skb_datagram_iter representative crash: KASAN: use-after-free Read in __skb_datagram_iter, types: [KASAN] # git bisect good 8979ed70da2f30baadc706056744d171ba43c249 Bisecting: 142 revisions left to test after this (roughly 7 steps) [09b900fc2cb187f0be8713dc18dcadcd3b030dbc] drm/msm/dp: skip validity check for DP CTS EDID checksum determine whether the revision contains the guilty commit revision 8979ed70da2f30baadc706056744d171ba43c249 crashed and is reachable testing commit 09b900fc2cb187f0be8713dc18dcadcd3b030dbc gcc compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: f65e26b28b715b9ac3115cddbcad6c17f66dceabf4cd5c93fc7416771120705a run #0: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #1: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #2: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #3: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #4: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #5: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #6: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #7: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #8: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #9: crashed: KASAN: use-after-free Read in __skb_datagram_iter representative crash: KASAN: use-after-free Read in __skb_datagram_iter, types: [KASAN] # git bisect good 09b900fc2cb187f0be8713dc18dcadcd3b030dbc Bisecting: 71 revisions left to test after this (roughly 6 steps) [2fa178e2cd5f29088d9f51ae84521d2423c4da43] mtd: rawnand: tegra: add missing check for platform_get_irq() determine whether the revision contains the guilty commit revision fb2635ac69abac0060cc2be2873dc4f524f12e66 crashed and is reachable testing commit 2fa178e2cd5f29088d9f51ae84521d2423c4da43 gcc compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 5b9ee2516097efee0c3cac2222258ca20b7977a6d75fecb08b1e2c544aa94ec6 run #0: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #1: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #2: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #3: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #4: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #5: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #6: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #7: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #8: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #9: crashed: KASAN: use-after-free Read in unix_stream_read_actor representative crash: KASAN: use-after-free Read in __skb_datagram_iter, types: [KASAN] # git bisect good 2fa178e2cd5f29088d9f51ae84521d2423c4da43 Bisecting: 35 revisions left to test after this (roughly 5 steps) [e8ae37f86368883845785e544eace9ea8596eaec] net/mlx5e: fix double free of encap_header determine whether the revision contains the guilty commit revision 8979ed70da2f30baadc706056744d171ba43c249 crashed and is reachable testing commit e8ae37f86368883845785e544eace9ea8596eaec gcc compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 96e4f185d32d633145040d737b362b557d6a7495a6d2407390e4ffa354510a0f all runs: OK false negative chance: 0.000 # git bisect bad e8ae37f86368883845785e544eace9ea8596eaec Bisecting: 17 revisions left to test after this (roughly 4 steps) [07f5b8c47152cadbd9102e053dcb60685820aa09] net: hns3: fix out-of-bounds access may occur when coalesce info is read via debugfs determine whether the revision contains the guilty commit revision fb2635ac69abac0060cc2be2873dc4f524f12e66 crashed and is reachable testing commit 07f5b8c47152cadbd9102e053dcb60685820aa09 gcc compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 570972abdc2000ac1ceaef6b06176f9a02947c3117d6825413b353bbbee576fd run #0: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #1: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #2: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #3: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #4: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #5: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #6: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #7: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #8: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #9: crashed: KASAN: use-after-free Read in unix_stream_read_actor representative crash: KASAN: use-after-free Read in unix_stream_read_actor, types: [KASAN] # git bisect good 07f5b8c47152cadbd9102e053dcb60685820aa09 Bisecting: 8 revisions left to test after this (roughly 3 steps) [19554aa901b5833787df4417a05ccdebf351b7f4] bonding: stop the device in bond_setup_by_slave() determine whether the revision contains the guilty commit revision 8979ed70da2f30baadc706056744d171ba43c249 crashed and is reachable testing commit 19554aa901b5833787df4417a05ccdebf351b7f4 gcc compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 9d78e2d76fc5911139474b658ee455139ed924e38cfe0b01c924bb9c1e7511de run #0: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #1: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #2: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #3: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #4: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #5: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #6: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #7: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #8: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #9: crashed: KASAN: use-after-free Read in unix_stream_read_actor representative crash: KASAN: use-after-free Read in __skb_datagram_iter, types: [KASAN] # git bisect good 19554aa901b5833787df4417a05ccdebf351b7f4 Bisecting: 4 revisions left to test after this (roughly 2 steps) [d179189eec426fe4801e4b91efa1889faed12700] af_unix: fix use-after-free in unix_stream_read_actor() determine whether the revision contains the guilty commit revision 09b900fc2cb187f0be8713dc18dcadcd3b030dbc crashed and is reachable testing commit d179189eec426fe4801e4b91efa1889faed12700 gcc compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 21fab88a397c34c9535b4cd040f5271a60eb9663205fd4a29049e75ea9bb538c all runs: OK false negative chance: 0.000 # git bisect bad d179189eec426fe4801e4b91efa1889faed12700 Bisecting: 1 revision left to test after this (roughly 1 step) [1a1efaed5fc2d3def0b6dfcea4e17609730415e3] net: ethernet: cortina: Handle large frames determine whether the revision contains the guilty commit revision 8979ed70da2f30baadc706056744d171ba43c249 crashed and is reachable testing commit 1a1efaed5fc2d3def0b6dfcea4e17609730415e3 gcc compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: e8b5f5069e33ec90d17a9224c807f3365b3a04fdc516d183a7ba41dd3de962f6 run #0: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #1: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #2: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #3: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #4: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #5: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #6: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #7: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #8: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #9: crashed: KASAN: use-after-free Read in unix_stream_read_actor representative crash: KASAN: use-after-free Read in __skb_datagram_iter, types: [KASAN] # git bisect good 1a1efaed5fc2d3def0b6dfcea4e17609730415e3 Bisecting: 0 revisions left to test after this (roughly 0 steps) [14b11892a6da85b8440ea5cc5ac4ed37b99a43a6] net: ethernet: cortina: Fix MTU max setting determine whether the revision contains the guilty commit revision 1a1efaed5fc2d3def0b6dfcea4e17609730415e3 crashed and is reachable testing commit 14b11892a6da85b8440ea5cc5ac4ed37b99a43a6 gcc compiler: Debian clang version 15.0.6, GNU ld (GNU Binutils for Debian) 2.40 kernel signature: 6d1d5d1190b9c3ed03f36555cf09182421d9c331d4c09a00c5f291f4ee39de42 run #0: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #1: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #2: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #3: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #4: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #5: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #6: crashed: KASAN: use-after-free Read in unix_stream_read_actor run #7: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #8: crashed: KASAN: use-after-free Read in __skb_datagram_iter run #9: crashed: KASAN: use-after-free Read in __skb_datagram_iter representative crash: KASAN: use-after-free Read in __skb_datagram_iter, types: [KASAN] # git bisect good 14b11892a6da85b8440ea5cc5ac4ed37b99a43a6 d179189eec426fe4801e4b91efa1889faed12700 is the first bad commit commit d179189eec426fe4801e4b91efa1889faed12700 Author: Eric Dumazet Date: Mon Nov 13 13:49:38 2023 +0000 af_unix: fix use-after-free in unix_stream_read_actor() [ Upstream commit 4b7b492615cf3017190f55444f7016812b66611d ] syzbot reported the following crash [1] After releasing unix socket lock, u->oob_skb can be changed by another thread. We must temporarily increase skb refcount to make sure this other thread will not free the skb under us. [1] BUG: KASAN: slab-use-after-free in unix_stream_read_actor+0xa7/0xc0 net/unix/af_unix.c:2866 Read of size 4 at addr ffff88801f3b9cc4 by task syz-executor107/5297 CPU: 1 PID: 5297 Comm: syz-executor107 Not tainted 6.6.0-syzkaller-15910-gb8e3a87a627b #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 10/09/2023 Call Trace: __dump_stack lib/dump_stack.c:88 [inline] dump_stack_lvl+0xd9/0x1b0 lib/dump_stack.c:106 print_address_description mm/kasan/report.c:364 [inline] print_report+0xc4/0x620 mm/kasan/report.c:475 kasan_report+0xda/0x110 mm/kasan/report.c:588 unix_stream_read_actor+0xa7/0xc0 net/unix/af_unix.c:2866 unix_stream_recv_urg net/unix/af_unix.c:2587 [inline] unix_stream_read_generic+0x19a5/0x2480 net/unix/af_unix.c:2666 unix_stream_recvmsg+0x189/0x1b0 net/unix/af_unix.c:2903 sock_recvmsg_nosec net/socket.c:1044 [inline] sock_recvmsg+0xe2/0x170 net/socket.c:1066 ____sys_recvmsg+0x21f/0x5c0 net/socket.c:2803 ___sys_recvmsg+0x115/0x1a0 net/socket.c:2845 __sys_recvmsg+0x114/0x1e0 net/socket.c:2875 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x63/0x6b RIP: 0033:0x7fc67492c559 Code: 28 00 00 00 75 05 48 83 c4 28 c3 e8 51 18 00 00 90 48 89 f8 48 89 f7 48 89 d6 48 89 ca 4d 89 c2 4d 89 c8 4c 8b 4c 24 08 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 c7 c1 b0 ff ff ff f7 d8 64 89 01 48 RSP: 002b:00007fc6748ab228 EFLAGS: 00000246 ORIG_RAX: 000000000000002f RAX: ffffffffffffffda RBX: 000000000000001c RCX: 00007fc67492c559 RDX: 0000000040010083 RSI: 0000000020000140 RDI: 0000000000000004 RBP: 00007fc6749b6348 R08: 00007fc6748ab6c0 R09: 00007fc6748ab6c0 R10: 0000000000000000 R11: 0000000000000246 R12: 00007fc6749b6340 R13: 00007fc6749b634c R14: 00007ffe9fac52a0 R15: 00007ffe9fac5388 Allocated by task 5295: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 __kasan_slab_alloc+0x81/0x90 mm/kasan/common.c:328 kasan_slab_alloc include/linux/kasan.h:188 [inline] slab_post_alloc_hook mm/slab.h:763 [inline] slab_alloc_node mm/slub.c:3478 [inline] kmem_cache_alloc_node+0x180/0x3c0 mm/slub.c:3523 __alloc_skb+0x287/0x330 net/core/skbuff.c:641 alloc_skb include/linux/skbuff.h:1286 [inline] alloc_skb_with_frags+0xe4/0x710 net/core/skbuff.c:6331 sock_alloc_send_pskb+0x7e4/0x970 net/core/sock.c:2780 sock_alloc_send_skb include/net/sock.h:1884 [inline] queue_oob net/unix/af_unix.c:2147 [inline] unix_stream_sendmsg+0xb5f/0x10a0 net/unix/af_unix.c:2301 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg+0xd5/0x180 net/socket.c:745 ____sys_sendmsg+0x6ac/0x940 net/socket.c:2584 ___sys_sendmsg+0x135/0x1d0 net/socket.c:2638 __sys_sendmsg+0x117/0x1e0 net/socket.c:2667 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x63/0x6b Freed by task 5295: kasan_save_stack+0x33/0x50 mm/kasan/common.c:45 kasan_set_track+0x25/0x30 mm/kasan/common.c:52 kasan_save_free_info+0x2b/0x40 mm/kasan/generic.c:522 ____kasan_slab_free mm/kasan/common.c:236 [inline] ____kasan_slab_free+0x15b/0x1b0 mm/kasan/common.c:200 kasan_slab_free include/linux/kasan.h:164 [inline] slab_free_hook mm/slub.c:1800 [inline] slab_free_freelist_hook+0x114/0x1e0 mm/slub.c:1826 slab_free mm/slub.c:3809 [inline] kmem_cache_free+0xf8/0x340 mm/slub.c:3831 kfree_skbmem+0xef/0x1b0 net/core/skbuff.c:1015 __kfree_skb net/core/skbuff.c:1073 [inline] consume_skb net/core/skbuff.c:1288 [inline] consume_skb+0xdf/0x170 net/core/skbuff.c:1282 queue_oob net/unix/af_unix.c:2178 [inline] unix_stream_sendmsg+0xd49/0x10a0 net/unix/af_unix.c:2301 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg+0xd5/0x180 net/socket.c:745 ____sys_sendmsg+0x6ac/0x940 net/socket.c:2584 ___sys_sendmsg+0x135/0x1d0 net/socket.c:2638 __sys_sendmsg+0x117/0x1e0 net/socket.c:2667 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x63/0x6b The buggy address belongs to the object at ffff88801f3b9c80 which belongs to the cache skbuff_head_cache of size 240 The buggy address is located 68 bytes inside of freed 240-byte region [ffff88801f3b9c80, ffff88801f3b9d70) The buggy address belongs to the physical page: page:ffffea00007cee40 refcount:1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x1f3b9 flags: 0xfff00000000800(slab|node=0|zone=1|lastcpupid=0x7ff) page_type: 0xffffffff() raw: 00fff00000000800 ffff888142a60640 dead000000000122 0000000000000000 raw: 0000000000000000 00000000000c000c 00000001ffffffff 0000000000000000 page dumped because: kasan: bad access detected page_owner tracks the page as allocated page last allocated via order 0, migratetype Unmovable, gfp_mask 0x12cc0(GFP_KERNEL|__GFP_NOWARN|__GFP_NORETRY), pid 5299, tgid 5283 (syz-executor107), ts 103803840339, free_ts 103600093431 set_page_owner include/linux/page_owner.h:31 [inline] post_alloc_hook+0x2cf/0x340 mm/page_alloc.c:1537 prep_new_page mm/page_alloc.c:1544 [inline] get_page_from_freelist+0xa25/0x36c0 mm/page_alloc.c:3312 __alloc_pages+0x1d0/0x4a0 mm/page_alloc.c:4568 alloc_pages_mpol+0x258/0x5f0 mm/mempolicy.c:2133 alloc_slab_page mm/slub.c:1870 [inline] allocate_slab+0x251/0x380 mm/slub.c:2017 new_slab mm/slub.c:2070 [inline] ___slab_alloc+0x8c7/0x1580 mm/slub.c:3223 __slab_alloc.constprop.0+0x56/0xa0 mm/slub.c:3322 __slab_alloc_node mm/slub.c:3375 [inline] slab_alloc_node mm/slub.c:3468 [inline] kmem_cache_alloc_node+0x132/0x3c0 mm/slub.c:3523 __alloc_skb+0x287/0x330 net/core/skbuff.c:641 alloc_skb include/linux/skbuff.h:1286 [inline] alloc_skb_with_frags+0xe4/0x710 net/core/skbuff.c:6331 sock_alloc_send_pskb+0x7e4/0x970 net/core/sock.c:2780 sock_alloc_send_skb include/net/sock.h:1884 [inline] queue_oob net/unix/af_unix.c:2147 [inline] unix_stream_sendmsg+0xb5f/0x10a0 net/unix/af_unix.c:2301 sock_sendmsg_nosec net/socket.c:730 [inline] __sock_sendmsg+0xd5/0x180 net/socket.c:745 ____sys_sendmsg+0x6ac/0x940 net/socket.c:2584 ___sys_sendmsg+0x135/0x1d0 net/socket.c:2638 __sys_sendmsg+0x117/0x1e0 net/socket.c:2667 page last free stack trace: reset_page_owner include/linux/page_owner.h:24 [inline] free_pages_prepare mm/page_alloc.c:1137 [inline] free_unref_page_prepare+0x4f8/0xa90 mm/page_alloc.c:2347 free_unref_page+0x33/0x3b0 mm/page_alloc.c:2487 __unfreeze_partials+0x21d/0x240 mm/slub.c:2655 qlink_free mm/kasan/quarantine.c:168 [inline] qlist_free_all+0x6a/0x170 mm/kasan/quarantine.c:187 kasan_quarantine_reduce+0x18e/0x1d0 mm/kasan/quarantine.c:294 __kasan_slab_alloc+0x65/0x90 mm/kasan/common.c:305 kasan_slab_alloc include/linux/kasan.h:188 [inline] slab_post_alloc_hook mm/slab.h:763 [inline] slab_alloc_node mm/slub.c:3478 [inline] slab_alloc mm/slub.c:3486 [inline] __kmem_cache_alloc_lru mm/slub.c:3493 [inline] kmem_cache_alloc+0x15d/0x380 mm/slub.c:3502 vm_area_dup+0x21/0x2f0 kernel/fork.c:500 __split_vma+0x17d/0x1070 mm/mmap.c:2365 split_vma mm/mmap.c:2437 [inline] vma_modify+0x25d/0x450 mm/mmap.c:2472 vma_modify_flags include/linux/mm.h:3271 [inline] mprotect_fixup+0x228/0xc80 mm/mprotect.c:635 do_mprotect_pkey+0x852/0xd60 mm/mprotect.c:809 __do_sys_mprotect mm/mprotect.c:830 [inline] __se_sys_mprotect mm/mprotect.c:827 [inline] __x64_sys_mprotect+0x78/0xb0 mm/mprotect.c:827 do_syscall_x64 arch/x86/entry/common.c:51 [inline] do_syscall_64+0x3f/0x110 arch/x86/entry/common.c:82 entry_SYSCALL_64_after_hwframe+0x63/0x6b Memory state around the buggy address: ffff88801f3b9b80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff88801f3b9c00: fb fb fb fb fb fb fc fc fc fc fc fc fc fc fc fc >ffff88801f3b9c80: fa fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff88801f3b9d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fc fc ffff88801f3b9d80: fc fc fc fc fc fc fc fc fa fb fb fb fb fb fb fb Fixes: 876c14ad014d ("af_unix: fix holding spinlock in oob handling") Reported-and-tested-by: syzbot+7a2d546fa43e49315ed3@syzkaller.appspotmail.com Signed-off-by: Eric Dumazet Cc: Rao Shoaib Reviewed-by: Rao shoaib Link: https://lore.kernel.org/r/20231113134938.168151-1-edumazet@google.com Signed-off-by: Paolo Abeni Signed-off-by: Sasha Levin net/unix/af_unix.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) accumulated error probability: 0.00 culprit signature: 21fab88a397c34c9535b4cd040f5271a60eb9663205fd4a29049e75ea9bb538c parent signature: 6d1d5d1190b9c3ed03f36555cf09182421d9c331d4c09a00c5f291f4ee39de42 revisions tested: 18, total time: 3h50m59.649039997s (build: 1h1m21.597244727s, test: 2h43m34.560917423s) first good commit: d179189eec426fe4801e4b91efa1889faed12700 af_unix: fix use-after-free in unix_stream_read_actor() recipients (to): ["edumazet@google.com" "pabeni@redhat.com" "rao.shoaib@oracle.com" "sashal@kernel.org" "syzbot+7a2d546fa43e49315ed3@syzkaller.appspotmail.com"] recipients (cc): []