Received: by 2002:a25:1506:0:0:0:0:0 with SMTP id 6csp1558155ybv; Sun, 23 Feb 2020 09:30:30 -0800 (PST) X-Google-Smtp-Source: APXvYqwkhB8UI7OKlaGYJWNRdFQ+dWDOFkq4xFzNST5Q1qvLbSrLmkpm6wcayANX/X4n+e/r0glH X-Received: by 2002:aca:bcd7:: with SMTP id m206mr7039998oif.46.1582479030523; Sun, 23 Feb 2020 09:30:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1582479030; cv=none; d=google.com; s=arc-20160816; b=TgswBwzVZekoNYnHyctrZ/dYr3+mlEBfep/3CuCnAqncNZMoIzdiqfy12tmuctYEc5 PkOK+AVuZ22Qg4/GPtg4D1OCCCYqCGOhNDABpVpLYTP/otBMOfCEJ3MvjzYChhkNwoaH fceJdIobxnvW56ivg+uVb0gHJSwCdMqko5QvI1aTAV+JGIl9ONHWGcq5JLW0LxAP5LlZ 4ucWSIBV6dZhcnhFAhl3G7gkbX5tB3QDwVXQ/pHETFZYqZU8KSpIHMZbP4tXkfeRUC0i I2bTp1eRFIrk/Xx7ESDJNQehYnPhTsA9l+EK0Q1Yw4Su0HraKdVloFVRAJTpe5ygQeyD vdeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:to:from:subject:message-id:date :mime-version; bh=R7hdqwHw5eeNO6TxhG5nNkBVCSV9QlKOYXhwkg+mFF4=; b=WTw/IkG5dWJRzWLLNWERkOiQt0lRnVbWCYa1otyJu6/iebS6XlR4CRkFP+MosSclV8 YIxj+KMdY6vTPCDTJGxU+7T64zHMAJ+J9r38Gx2sZdQ8k9WJOyduFmcQlMs+CMkyiYNY d3n+kADFcveFZ4iR0HVACFQfByhxdGEwD0XL2M0VFIKAjQu9E2gR6XNMuxUaWf+lcTz7 0zUmoezB3hgD2DPL3xzH6ID6YTFNTuTUUfSpJGICLfXdfqwDrWpoPssyNCwpBSGScht5 5w6PJuYco9ACp4peZGgUGwesso3qYtgmi6cMDXdpWgnAnAwSyTf1repNlNlUq28OJW6F c6bQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=appspotmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id d83si4118528oib.166.2020.02.23.09.30.18; Sun, 23 Feb 2020 09:30:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=appspotmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727100AbgBWRaO (ORCPT + 99 others); Sun, 23 Feb 2020 12:30:14 -0500 Received: from mail-il1-f197.google.com ([209.85.166.197]:53311 "EHLO mail-il1-f197.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726302AbgBWRaN (ORCPT ); Sun, 23 Feb 2020 12:30:13 -0500 Received: by mail-il1-f197.google.com with SMTP id d3so12716844ilg.20 for ; Sun, 23 Feb 2020 09:30:12 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:date:message-id:subject:from:to; bh=R7hdqwHw5eeNO6TxhG5nNkBVCSV9QlKOYXhwkg+mFF4=; b=OCX3JMaQ0CRQudvbGmFLJuiFnL7TVLSiS7kkq8pHesbwy0PknqruD329AHRqR91C5b T+cUpYufizzdIA+j59+h7rQjaQRNniaBGLz0KWxY/Vp3rcLWIOuTMDKOJWL72XF6lSsL OdsKe7t9WMLT4+CaODj/BBg5ZveiusTZvbtfZE52BlccP0p5uPXtWkfKGz0ON1TU3d8x 07m9aUZZ9gsLZwn/roX6BwHCJqlFwD6/ym54thaW8ySFf+1qU1EzElSR1X13sC6i3z2x ejluvsJK5qaMo2nrYMBG+KcLNQlv+/+F3VtTHHYYMnnfCsaHJ04nMf0oQjkhVlDOyD1P uT5A== X-Gm-Message-State: APjAAAX6w2CHGfEZkyzfYsCEmwQqEu1WkphnbsdjR6O/LlEme9e7eabE WpTUbI+DX9+keH4TeA17mVUwmMaaZCrzLm6DvUJM0P1PNb76 MIME-Version: 1.0 X-Received: by 2002:a92:af99:: with SMTP id v25mr55751208ill.289.1582479012287; Sun, 23 Feb 2020 09:30:12 -0800 (PST) Date: Sun, 23 Feb 2020 09:30:12 -0800 X-Google-Appengine-App-Id: s~syzkaller X-Google-Appengine-App-Id-Alias: syzkaller Message-ID: <00000000000064653f059f419b58@google.com> Subject: KASAN: use-after-free Read in bit_putcs From: syzbot To: b.zolnierkie@samsung.com, dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org, syzkaller-bugs@googlegroups.com Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello, syzbot found the following crash on: HEAD commit: 0a44cac8 Merge tag 'dma-mapping-5.6' of git://git.infradea.. git tree: upstream console output: https://syzkaller.appspot.com/x/log.txt?x=11bfb74ee00000 kernel config: https://syzkaller.appspot.com/x/.config?x=a61f2164c515c07f dashboard link: https://syzkaller.appspot.com/bug?extid=b308f5fd049fbbc6e74f compiler: clang version 10.0.0 (https://github.com/llvm/llvm-project/ c2443155a0fb245c8f17f2c1c72b6ea391e86e81) Unfortunately, I don't have any reproducer for this crash yet. IMPORTANT: if you fix the bug, please add the following tag to the commit: Reported-by: syzbot+b308f5fd049fbbc6e74f@syzkaller.appspotmail.com ================================================================== BUG: KASAN: use-after-free in __fb_pad_aligned_buffer include/linux/fb.h:655 [inline] BUG: KASAN: use-after-free in bit_putcs_aligned drivers/video/fbdev/core/bitblit.c:96 [inline] BUG: KASAN: use-after-free in bit_putcs+0x13ee/0x1cc0 drivers/video/fbdev/core/bitblit.c:185 Read of size 1 at addr ffff8880a8087c10 by task syz-executor.2/5278 CPU: 1 PID: 5278 Comm: syz-executor.2 Not tainted 5.6.0-rc2-syzkaller #0 Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 01/01/2011 Call Trace: __dump_stack lib/dump_stack.c:77 [inline] dump_stack+0x1fb/0x318 lib/dump_stack.c:118 print_address_description+0x74/0x5c0 mm/kasan/report.c:374 __kasan_report+0x149/0x1c0 mm/kasan/report.c:506 kasan_report+0x26/0x50 mm/kasan/common.c:641 __asan_report_load1_noabort+0x14/0x20 mm/kasan/generic_report.c:132 __fb_pad_aligned_buffer include/linux/fb.h:655 [inline] bit_putcs_aligned drivers/video/fbdev/core/bitblit.c:96 [inline] bit_putcs+0x13ee/0x1cc0 drivers/video/fbdev/core/bitblit.c:185 fbcon_putcs+0x7b4/0xad0 drivers/video/fbdev/core/fbcon.c:1360 do_update_region+0x462/0x600 drivers/tty/vt/vt.c:677 redraw_screen+0xcc5/0x1830 drivers/tty/vt/vt.c:1011 vc_do_resize+0x12af/0x1af0 drivers/tty/vt/vt.c:1284 vc_resize+0x4f/0x60 drivers/tty/vt/vt.c:1304 vt_ioctl+0x2fa8/0x3a70 drivers/tty/vt/vt_ioctl.c:887 tty_ioctl+0xee6/0x15c0 drivers/tty/tty_io.c:2660 vfs_ioctl fs/ioctl.c:47 [inline] ksys_ioctl fs/ioctl.c:763 [inline] __do_sys_ioctl fs/ioctl.c:772 [inline] __se_sys_ioctl+0x113/0x190 fs/ioctl.c:770 __x64_sys_ioctl+0x7b/0x90 fs/ioctl.c:770 do_syscall_64+0xf7/0x1c0 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe RIP: 0033:0x45c449 Code: ad b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 00 66 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 0f 83 7b b6 fb ff c3 66 2e 0f 1f 84 00 00 00 00 RSP: 002b:00007f74261f2c78 EFLAGS: 00000246 ORIG_RAX: 0000000000000010 RAX: ffffffffffffffda RBX: 00007f74261f36d4 RCX: 000000000045c449 RDX: 0000000020000080 RSI: 000000000000560a RDI: 0000000000000003 RBP: 000000000076bf20 R08: 0000000000000000 R09: 0000000000000000 R10: 0000000000000000 R11: 0000000000000246 R12: 00000000ffffffff R13: 000000000000066b R14: 00000000004c8fe0 R15: 000000000076bf2c Allocated by task 2919: save_stack mm/kasan/common.c:72 [inline] set_track mm/kasan/common.c:80 [inline] __kasan_kmalloc+0x118/0x1c0 mm/kasan/common.c:515 kasan_kmalloc+0x9/0x10 mm/kasan/common.c:529 __do_kmalloc_node mm/slab.c:3616 [inline] __kmalloc_node_track_caller+0x4d/0x60 mm/slab.c:3630 __kmalloc_reserve net/core/skbuff.c:142 [inline] __alloc_skb+0xe8/0x500 net/core/skbuff.c:210 alloc_skb include/linux/skbuff.h:1051 [inline] _sctp_make_chunk+0x60/0x460 net/sctp/sm_make_chunk.c:1394 sctp_make_data net/sctp/sm_make_chunk.c:1426 [inline] sctp_make_datafrag_empty+0xa3/0x5b0 net/sctp/sm_make_chunk.c:740 sctp_datamsg_from_user+0x7a8/0x1020 net/sctp/chunk.c:262 sctp_sendmsg_to_asoc+0x7a9/0x1500 net/sctp/socket.c:1844 sctp_sendmsg+0x15a1/0x3570 net/sctp/socket.c:2016 inet_sendmsg+0x147/0x310 net/ipv4/af_inet.c:807 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg net/socket.c:672 [inline] ____sys_sendmsg+0x4f7/0x7f0 net/socket.c:2343 ___sys_sendmsg net/socket.c:2397 [inline] __sys_sendmsg+0x1ed/0x290 net/socket.c:2430 __do_sys_sendmsg net/socket.c:2439 [inline] __se_sys_sendmsg net/socket.c:2437 [inline] __x64_sys_sendmsg+0x7f/0x90 net/socket.c:2437 do_syscall_64+0xf7/0x1c0 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe Freed by task 2919: save_stack mm/kasan/common.c:72 [inline] set_track mm/kasan/common.c:80 [inline] kasan_set_free_info mm/kasan/common.c:337 [inline] __kasan_slab_free+0x12e/0x1e0 mm/kasan/common.c:476 kasan_slab_free+0xe/0x10 mm/kasan/common.c:485 __cache_free mm/slab.c:3426 [inline] kfree+0x10d/0x220 mm/slab.c:3757 skb_free_head net/core/skbuff.c:592 [inline] skb_release_data+0x72f/0x8c0 net/core/skbuff.c:612 skb_release_all net/core/skbuff.c:666 [inline] __kfree_skb+0x59/0x1c0 net/core/skbuff.c:680 consume_skb+0x72/0x110 net/core/skbuff.c:839 sctp_chunk_destroy net/sctp/sm_make_chunk.c:1454 [inline] sctp_chunk_put+0x17b/0x200 net/sctp/sm_make_chunk.c:1481 sctp_chunk_free+0x59/0x60 net/sctp/sm_make_chunk.c:1468 sctp_outq_sack+0x1169/0x16a0 net/sctp/outqueue.c:1352 sctp_cmd_process_sack net/sctp/sm_sideeffect.c:798 [inline] sctp_cmd_interpreter net/sctp/sm_sideeffect.c:1354 [inline] sctp_side_effects net/sctp/sm_sideeffect.c:1185 [inline] sctp_do_sm+0x18f3/0x5840 net/sctp/sm_sideeffect.c:1156 sctp_assoc_bh_rcv+0x494/0x770 net/sctp/associola.c:1044 sctp_inq_push+0x1ab/0x1d0 net/sctp/inqueue.c:80 sctp_backlog_rcv+0x16c/0x4b0 net/sctp/input.c:344 sk_backlog_rcv include/net/sock.h:938 [inline] __release_sock+0x1c1/0x4b0 net/core/sock.c:2437 release_sock+0x65/0x1c0 net/core/sock.c:2953 sctp_wait_for_connect+0x2f6/0x590 net/sctp/socket.c:9280 sctp_sendmsg_to_asoc+0x11ba/0x1500 net/sctp/socket.c:1870 sctp_sendmsg+0x15a1/0x3570 net/sctp/socket.c:2016 inet_sendmsg+0x147/0x310 net/ipv4/af_inet.c:807 sock_sendmsg_nosec net/socket.c:652 [inline] sock_sendmsg net/socket.c:672 [inline] ____sys_sendmsg+0x4f7/0x7f0 net/socket.c:2343 ___sys_sendmsg net/socket.c:2397 [inline] __sys_sendmsg+0x1ed/0x290 net/socket.c:2430 __do_sys_sendmsg net/socket.c:2439 [inline] __se_sys_sendmsg net/socket.c:2437 [inline] __x64_sys_sendmsg+0x7f/0x90 net/socket.c:2437 do_syscall_64+0xf7/0x1c0 arch/x86/entry/common.c:294 entry_SYSCALL_64_after_hwframe+0x49/0xbe The buggy address belongs to the object at ffff8880a8087c00 which belongs to the cache kmalloc-512 of size 512 The buggy address is located 16 bytes inside of 512-byte region [ffff8880a8087c00, ffff8880a8087e00) The buggy address belongs to the page: page:ffffea0002a021c0 refcount:1 mapcount:0 mapping:ffff8880aa400a80 index:0x0 flags: 0xfffe0000000200(slab) raw: 00fffe0000000200 ffffea0002431688 ffffea000259d648 ffff8880aa400a80 raw: 0000000000000000 ffff8880a8087000 0000000100000004 0000000000000000 page dumped because: kasan: bad access detected Memory state around the buggy address: ffff8880a8087b00: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc ffff8880a8087b80: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc >ffff8880a8087c00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ^ ffff8880a8087c80: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ffff8880a8087d00: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb ================================================================== --- This bug is generated by a bot. It may contain errors. See https://goo.gl/tpsmEJ for more information about syzbot. syzbot engineers can be reached at syzkaller@googlegroups.com. syzbot will keep track of this bug report. See: https://goo.gl/tpsmEJ#status for how to communicate with syzbot.