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: <e04a034b-98e2-ed4b-22d9-833c5d950e18@codeaurora.org>
Date:   Wed, 27 Mar 2019 20:19:24 +0530
From:   Mukesh Ojha <mojha@...eaurora.org>
To:     Kangjie Lu <kjlu@....edu>
Cc:     Stefan Wahren <stefan.wahren@...e.com>, devel@...verdev.osuosl.org,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Phil Elwell <phil@...pberrypi.org>,
        linux-kernel@...r.kernel.org,
        Tobias Büttner <tobias.buettner@....de>,
        Eric Anholt <eric@...olt.net>,
        Luis Chamberlain <mcgrof@...nel.org>,
        linux-rpi-kernel@...ts.infradead.org, pakki001@....edu,
        Dominic Braun <inf.braun@....de>,
        Nicolas Saenz Julienne <nsaenzjulienne@...e.de>,
        linux-arm-kernel@...ts.infradead.org
Subject: Re: [PATCH] vc04_services: vchiq_arm: fix a NULL pointer dereference


On 3/25/2019 4:13 AM, Kangjie Lu wrote:
> When kzalloc fails, "platform_state->inited = 1" is a NULL pointer
> dereference. The fix returns VCHIQ_ERROR in case it failed to
> avoid NULL pointer dereference.
>
> Signed-off-by: Kangjie Lu <kjlu@....edu>


Reviewed-by: Mukesh Ojha <mojha@...eaurora.org>

-Mukesh

> ---
>   .../staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c  | 2 ++
>   1 file changed, 2 insertions(+)
>
> diff --git a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c
> index dd4898861b83..0f12fe617575 100644
> --- a/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c
> +++ b/drivers/staging/vc04_services/interface/vchiq_arm/vchiq_2835_arm.c
> @@ -209,6 +209,8 @@ vchiq_platform_init_state(struct vchiq_state *state)
>   	struct vchiq_2835_state *platform_state;
>   
>   	state->platform_state = kzalloc(sizeof(*platform_state), GFP_KERNEL);
> +	if (!state->platform_state)
> +		return VCHIQ_ERROR;
>   	platform_state = (struct vchiq_2835_state *)state->platform_state;
>   
>   	platform_state->inited = 1;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ