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]
Date:   Tue, 25 Jan 2022 10:14:46 -0800
From:   Luis Chamberlain <mcgrof@...nel.org>
To:     Andrew Morton <akpm@...ux-foundation.org>
Cc:     kernel test robot <lkp@...el.com>,
        Tong Zhang <ztong0001@...il.com>,
        Alexander Viro <viro@...iv.linux.org.uk>,
        Eric Biederman <ebiederm@...ssion.com>,
        Kees Cook <keescook@...omium.org>,
        linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
        llvm@...ts.linux.dev, kbuild-all@...ts.01.org,
        Linux Memory Management List <linux-mm@...ck.org>
Subject: Re: [PATCH v1] binfmt_misc: fix crash when load/unload module

On Mon, Jan 24, 2022 at 03:16:11PM -0800, Andrew Morton wrote:
> On Mon, 24 Jan 2022 19:40:53 +0800 kernel test robot <lkp@...el.com> wrote:
> 
> > Hi Tong,
> > 
> > 
> > >> fs/binfmt_misc.c:828:21: error: incompatible pointer types assigning to 'struct ctl_table_header *' from 'struct sysctl_header *' [-Werror,-Wincompatible-pointer-types]
> >            binfmt_misc_header = register_sysctl_mount_point("fs/binfmt_misc");
> >                               ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> >    1 error generated.
> > 
> > 
> > vim +828 fs/binfmt_misc.c
> > 
> >    821	
> >    822	static int __init init_misc_binfmt(void)
> >    823	{
> >    824		int err = register_filesystem(&bm_fs_type);
> >    825		if (!err)
> >    826			insert_binfmt(&misc_format);
> >    827	
> >  > 828		binfmt_misc_header = register_sysctl_mount_point("fs/binfmt_misc");
> >    829		if (!binfmt_misc_header) {
> >    830			pr_warn("Failed to create fs/binfmt_misc sysctl mount point");
> >    831			return -ENOMEM;
> >    832		}
> >    833		return 0;
> >    834	}
> >    835	
> 
> This is actually a blooper in Luis's "sysctl: add helper to register a
> sysctl mount point".
> 
> Please test, review, ridicule, etc:
> 
> From: Andrew Morton <akpm@...ux-foundation.org>
> Subject: include/linux/sysctl.h: fix register_sysctl_mount_point() return type
> 
> The CONFIG_SYSCTL=n stub returns the wrong type.
> 
> Fixes: ee9efac48a082 ("sysctl: add helper to register a sysctl mount point")
> Cc: Luis Chamberlain <mcgrof@...nel.org>
> Cc: Tong Zhang <ztong0001@...il.com>
> Signed-off-by: Andrew Morton <akpm@...ux-foundation.org>

Acked-by: Luis Chamberlain <mcgrof@...nel.org>

  Luis

Powered by blists - more mailing lists