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] [day] [month] [year] [list]
Message-ID: <20210419105821.00001082.hbut_tan@163.com>
Date:   Mon, 19 Apr 2021 10:58:21 +0800
From:   Zhongjun Tan <hbut_tan@....com>
To:     Al Viro <viro@...iv.linux.org.uk>
Cc:     casey@...aufler-ca.com, jmorris@...ei.org, serge@...lyn.com,
        linux-security-module@...r.kernel.org,
        linux-kernel@...r.kernel.org, Zhongjun Tan <tanzhongjun@...ong.com>
Subject: Re: [PATCH] lsm:fix a missing-check bug in smack_sb_eat_lsm_opts()

On Fri, 16 Apr 2021 13:36:01 +0000
Al Viro <viro@...iv.linux.org.uk> wrote:

> On Fri, Apr 16, 2021 at 05:53:03PM +0800,  Zhongjun Tan wrote:
> 
> > @@ -710,13 +711,14 @@ static int smack_sb_eat_lsm_opts(char
> > *options, void **mnt_opts) token = match_opt_prefix(from, len,
> > &arg); if (token != Opt_error) {
> >  			arg = kmemdup_nul(arg, from + len - arg,
> > GFP_KERNEL);
> > +			if (!arg) {
> > +				rc = -ENOMEM;
> > +				goto free_mnt_opts;
> >  			rc = smack_add_opt(token, arg, mnt_opts);  
> 
> 			if (arg)
> 	  			rc = smack_add_opt(token, arg,
> mnt_opts); else
> 				rc = -ENOMEM;
> 
> and no other changes are needed anywhere...

update patch v3 , just four codes and no other changes are needed. 

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ