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: <25e057c01001080425q33ea8641ncf940c60700e9410@mail.gmail.com>
Date:	Fri, 8 Jan 2010 13:25:29 +0100
From:	roel kluin <roel.kluin@...il.com>
To:	Gabor Gombas <gombasg@...aki.hu>
Cc:	"Zhang, Xiantao" <xiantao.zhang@...el.com>,
	"kvm-ia64@...r.kernel.org" <kvm-ia64@...r.kernel.org>,
	Andrew Morton <akpm@...ux-foundation.org>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] KVM: dereference of NULL pointer in set_pal_result()

>> For the check "(p && p->exit_reason == EXIT_REASON_PAL_CALL", if p is NULL, the reference about "p->exit_reason == EXIT_REASON_PAL_CALL" won't be checked any more, so no issue here.

>> >     p = kvm_get_exit_data(vcpu);
>> > -   if (p && p->exit_reason == EXIT_REASON_PAL_CALL) {
>> > +   if (!p)
>> > +           return;
>> > +   if (p->exit_reason == EXIT_REASON_PAL_CALL) {
>> >             p->u.pal_data.ret = result;
>> > -           return ;
>> > +           return;
>> >     }
>> >     INIT_PAL_STATUS_UNIMPLEMENTED(p->u.pal_data.ret);
>
> IMHO it's not the test but the INIT_PAL_STATUS_UNIMPLEMENTED() that does
> the unwanted dereferencing, and that's fixed by the patch.
>
> Gabor

Correct. Thanks,

Roel
--
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