All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jeffrin Jose T <jeffrin@rajagiritech.edu.in>
To: Marco Elver <elver@google.com>
Cc: Andrey Ryabinin <aryabinin@virtuozzo.com>,
	Alexander Potapenko <glider@google.com>,
	Dmitry Vyukov <dvyukov@google.com>,
	kasan-dev <kasan-dev@googlegroups.com>,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: BUG: KASAN lib/test_kasan.c
Date: Sat, 05 Dec 2020 02:22:47 +0530	[thread overview]
Message-ID: <b5bd7b0924bd239eb8d6557e10eead8bb2b939a5.camel@rajagiritech.edu.in> (raw)
In-Reply-To: <CANpmjNMCiCf9w34duqGpQ90=qB4QGnRR8Xny+wOVf=2WG=JVoA@mail.gmail.com>

On Fri, 2020-12-04 at 21:29 +0100, Marco Elver wrote:
> On Fri, 4 Dec 2020 at 19:56, Jeffrin Jose T
> <jeffrin@rajagiritech.edu.in> wrote:
> > hello,
> > 
> >  detected   KASAN   BUG
> > 
> > [ related information ]
> > 
> > -------------------x-------------------x------------------------>
> > [   43.616259] BUG: KASAN: vmalloc-out-of-bounds in
> > vmalloc_oob+0x146/0x2c0
> > 
> > (gdb) l *vmalloc_oob+0x146/0x2c0
> > 0xffffffff81b8b0b0 is in vmalloc_oob (lib/test_kasan.c:764).
> 
> This is the KASAN test. It's a feature, not a bug. ;-)
> 
> > 759             kfree_sensitive(ptr);
> > 760             KUNIT_EXPECT_KASAN_FAIL(test,
> > kfree_sensitive(ptr));
> > 761     }
> > 762
> > 763     static void vmalloc_oob(struct kunit *test)
> > 764     {
> > 765             void *area;
> > 766
> > 767             if (!IS_ENABLED(CONFIG_KASAN_VMALLOC)) {
> > 768                     kunit_info(test, "CONFIG_KASAN_VMALLOC is
> > not
> > enabled.");
> > (gdb) l *vmalloc_oob+0x146
> > 0xffffffff81b8b1f6 is in vmalloc_oob (lib/test_kasan.c:779).
> > 774              * The MMU will catch that and crash us.
> > 775              */
> > 776             area = vmalloc(3000);
> > 777             KUNIT_ASSERT_NOT_ERR_OR_NULL(test, area);
> > 778
> > 779             KUNIT_EXPECT_KASAN_FAIL(test, ((volatile char
> > *)area)[3100]);
> > 780             vfree(area);
> > 781     }
> > 782
> > 783     static struct kunit_case kasan_kunit_test_cases[] = {
> > ----------------x-----------------------------x--------------------
> > >
> > 
> > Reported by: Jeffrin Jose T <jeffrin@rajagiritech.edu.in>
> 
> Which CI system is reporting these?
> 
> If you look, this is the KASAN test, and the report is very much
> intended since it's testing KASAN. Please blacklist the KASAN test
> (and any other tests testing debugging tools).
> 
> Thanks,
> -- Marco

gdb session was started by me.  (gdb ./vmlinux)

portion from dmesg output is as follows
--------------------x------------------------x-------------------------
-->
[   43.616259] BUG: KASAN: vmalloc-out-of-bounds in
vmalloc_oob+0x146/0x2c0
[   43.630470] Read of size 1 at addr ffffc9000006ec1c by task
kunit_try_catch/193

[   43.659055] CPU: 2 PID: 193 Comm: kunit_try_catch Tainted: G    B  
5.10.0-rc6+ #10
[   43.659070] Hardware name: ASUSTeK COMPUTER INC. VivoBook 15_ASUS
Laptop X507UAR/X507UAR, BIOS X507UAR.203 05/31/2018
[   43.659080] Call Trace:
[   43.659105]  dump_stack+0x119/0x179
[   43.659131]  print_address_description.constprop.0+0x1c/0x210
[   43.659163]  ? vmalloc_oob+0x146/0x2c0
[   43.659185]  kasan_report.cold+0x1f/0x37
[   43.659210]  ? vmalloc_oob+0x146/0x2c0
[   43.659234]  vmalloc_oob+0x146/0x2c0
[   43.659259]  ? kasan_global_oob+0x280/0x280
[   43.659287]  ? kunit_fail_assert_format+0xa0/0xa0
[   43.659313]  ? lock_release+0xb2/0x730
[   43.659334]  ? __kthread_parkme+0xa1/0x120
[   43.659356]  ? lock_acquired+0xb4/0x5b0
[   43.659379]  ? lock_downgrade+0x3d0/0x3d0
[   43.659403]  ? lock_contended+0x6e0/0x6e0
[   43.659423]  ? do_raw_spin_lock+0x1b0/0x1b0
[   43.659447]  ? io_schedule_timeout+0xb0/0xb0
[   43.659467]  ? static_obj+0x31/0x80
[   43.659492]  ? lockdep_hardirqs_on_prepare+0xe/0x240
[   43.659517]  ? memcg_accounted_kmem_cache+0x1b0/0x1b0
[   43.659542]  kunit_try_run_case+0xa6/0x150
[   43.659567]  ? kunit_catch_run_case+0x170/0x170
[   43.659591]  ? kunit_try_catch_throw+0x40/0x40
[   43.659617]  kunit_generic_run_threadfn_adapter+0x2e/0x50
[   43.659637]  kthread+0x232/0x260
[   43.659659]  ? __kthread_bind_mask+0x90/0x90
[   43.659684]  ret_from_fork+0x22/0x30


[   43.686511] Memory state around the buggy address:
[   43.700445]  ffffc9000006eb00: 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00
[   43.714559]  ffffc9000006eb80: 00 00 00 00 00 00 00 f8 f8 f8 f8 f8
f8 f8 f8 f8
[   43.728725] >ffffc9000006ec00: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
f8 f8 f8 f8
[   43.742808]                             ^
[   43.757156]  ffffc9000006ec80: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
f8 f8 f8 f8
[   43.771845]  ffffc9000006ed00: f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8 f8
f8 f8 f8 f8
[   43.785957]
==================================================================

-------------------x-----------------------------x---------------------
---------->


-- 
software engineer
rajagiri school of engineering and technology - autonomous



      reply	other threads:[~2020-12-04 20:53 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-04 18:56 BUG: KASAN lib/test_kasan.c Jeffrin Jose T
2020-12-04 20:29 ` Marco Elver
2020-12-04 20:52   ` Jeffrin Jose T [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=b5bd7b0924bd239eb8d6557e10eead8bb2b939a5.camel@rajagiritech.edu.in \
    --to=jeffrin@rajagiritech.edu.in \
    --cc=aryabinin@virtuozzo.com \
    --cc=dvyukov@google.com \
    --cc=elver@google.com \
    --cc=glider@google.com \
    --cc=kasan-dev@googlegroups.com \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.