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:	Fri, 16 Aug 2013 12:12:29 -0400
From:	Tejun Heo <tj@...nel.org>
To:	Richard Weinberger <richard@....at>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] print_worker_info: Handle pointer with more care

On Fri, Aug 16, 2013 at 05:56:46PM +0200, Richard Weinberger wrote:
> The function has a nice comment:
> /*
>  * This function is called without any synchronization and @task
>  * could be in any state.  Be careful with dereferences.
>  */
> 
> But a few lines later it blindly dereferences a few pointers.
> E.g. It can happen that the worker function is already done,
> then worker->current_pwq is NULL.
...
>  	probe_kernel_read(&fn, &worker->current_func, sizeof(fn));
>  	probe_kernel_read(&pwq, &worker->current_pwq, sizeof(pwq));
> +	if (!pwq)
> +		goto print;
> +
>  	probe_kernel_read(&wq, &pwq->wq, sizeof(wq));
> +	if (!wq)
> +		goto print;
> +

But none of the above are dereferences.  &ptr->field is offset
calculation, not a dereference.

Thanks.

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