lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  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:   Sun, 5 Mar 2017 09:43:47 +0000
From:   "Mintz, Yuval" <Yuval.Mintz@...ium.com>
To:     Michal Schmidt <mschmidt@...hat.com>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC:     "Elior, Ariel" <Ariel.Elior@...ium.com>
Subject: RE: [PATCH net 1/7] bnx2x: prevent crash when accessing PTP with
 interface down

> It is possible to crash the kernel by accessing a PTP device while its
> associated bnx2x interface is down. Before the interface is brought up, the
> timecounter is not initialized, so accessing it results in NULL dereference.
> 
> Fix it by checking if the interface is up.
> 
> Use -ENETDOWN as the error code when the interface is down.
>  -EFAULT in bnx2x_ptp_adjfreq() did not seem right.
> 
> Tested using phc_ctl get/set/adj/freq commands.
> 
> Signed-off-by: Michal Schmidt <mschmidt@...hat.com>

While I have no objections to the patch contents, does it even make
sense to try adjusting frequencies on a DOWNed interface?
Wouldn't it make more sense checking this in the calling context
Instead?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux - Powered by OpenVZ