lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAF8kJuPEg1yKNmVvPbEYGME8HRoTXdHTANm+OKOZwX9B6uEtmw@mail.gmail.com>
Date: Tue, 24 Sep 2024 08:56:53 -0700
From: Chris Li <chrisl@...nel.org>
To: Venkat Rao Bagalkote <venkat88@...ux.vnet.ibm.com>
Cc: Sergey Senozhatsky <senozhatsky@...omium.org>, Andrew Morton <akpm@...ux-foundation.org>, 
	Andrey Skvortsov <andrej.skvortzov@...il.com>, Minchan Kim <minchan@...nel.org>, 
	Jens Axboe <axboe@...nel.dk>, linux-kernel@...r.kernel.org, linux-block@...r.kernel.org, 
	stable@...r.kernel.org, Sachin Sant <sachinp@...ux.ibm.com>
Subject: Re: [PATCH v3] zram: don't free statically defined names

Hi,

I also hit this problem in my swap stress test. Sergey pointed me to
this thread.

Just want to add that the fixes works for my setup as well:

Tested-by: Chris Li <chrisl@...nel.org>

Chris


On Tue, Sep 24, 2024 at 1:16 AM Venkat Rao Bagalkote
<venkat88@...ux.vnet.ibm.com> wrote:
>
> Please add below tages to the patch.
>
> Reported-by: Venkat Rao Bagalkote <venkat88@...ux.vnet.ibm.com>
>
> Tested-by: Venkat Rao Bagalkote <venkat88@...ux.vnet.ibm.com>
>
> Refer:
> https://lore.kernel.org/lkml/57130e48-dbb6-4047-a8c7-ebf5aaea93f4@linux.vnet.ibm.com/
>
> Regards,
>
> Venkat.
>
> On 24/09/24 7:12 am, Sergey Senozhatsky wrote:
> > On (24/09/23 19:48), Andrey Skvortsov wrote:
> >> When CONFIG_ZRAM_MULTI_COMP isn't set ZRAM_SECONDARY_COMP can hold
> >> default_compressor, because it's the same offset as ZRAM_PRIMARY_COMP,
> >> so we need to make sure that we don't attempt to kfree() the
> >> statically defined compressor name.
> >>
> >> This is detected by KASAN.
> >>
> >> ==================================================================
> >>    Call trace:
> >>     kfree+0x60/0x3a0
> >>     zram_destroy_comps+0x98/0x198 [zram]
> >>     zram_reset_device+0x22c/0x4a8 [zram]
> >>     reset_store+0x1bc/0x2d8 [zram]
> >>     dev_attr_store+0x44/0x80
> >>     sysfs_kf_write+0xfc/0x188
> >>     kernfs_fop_write_iter+0x28c/0x428
> >>     vfs_write+0x4dc/0x9b8
> >>     ksys_write+0x100/0x1f8
> >>     __arm64_sys_write+0x74/0xb8
> >>     invoke_syscall+0xd8/0x260
> >>     el0_svc_common.constprop.0+0xb4/0x240
> >>     do_el0_svc+0x48/0x68
> >>     el0_svc+0x40/0xc8
> >>     el0t_64_sync_handler+0x120/0x130
> >>     el0t_64_sync+0x190/0x198
> >> ==================================================================
> >>
> >> Signed-off-by: Andrey Skvortsov <andrej.skvortzov@...il.com>
> >> Fixes: 684826f8271a ("zram: free secondary algorithms names")
> >> Cc: <stable@...r.kernel.org>
> > Reviewed-by: Sergey Senozhatsky <senozhatsky@...omium.org>
>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ