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: <87pq623dvv.fsf@rustcorp.com.au>
Date:	Tue, 04 Sep 2012 08:36:28 +0930
From:	Rusty Russell <rusty@...tcorp.com.au>
To:	Dmitry Kasatkin <dmitry.kasatkin@...el.com>,
	zohar@...ux.vnet.ibm.com, jmorris@...ei.org, dhowells@...hat.com,
	linux-security-module@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC v2 4/7] modsig: add integrity_module_check hook

Dmitry Kasatkin <dmitry.kasatkin@...el.com> writes:
> +#else
> +static inline int integrity_module_check(const void *buf, unsigned long len)
> +{
> +	return 0;
> +}
> +#endif

...

> +	err = integrity_module_check(hdr, len);
> +	if (err < 0)
> +		goto free_hdr;
> +
> +	/* cut signature tail */
> +	info->len = err;

This is a bug.

Firstly, you want the 'long' not 'int' as the return vale from
integrity_module_check().  But mainly, you want it to return 'len' not
0.

I'd also prefer it to be *immediately* after we copy from userspace.

Cheers,
Rusty.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ