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]
Message-ID: <5547B04C.8080706@siemens.com>
Date:	Mon, 04 May 2015 19:45:48 +0200
From:	Jan Kiszka <jan.kiszka@...mens.com>
To:	Peter Hurley <peter@...leysoftware.com>,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
CC:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	linux-serial@...r.kernel.org
Subject: Re: [PATCH] serial: 8250: Prevent kernel crash with nr_uarts=0

On 2015-05-04 19:02, Peter Hurley wrote:
> Hi Jan,
> 
> On 05/04/2015 12:01 PM, Jan Kiszka wrote:
>> When nr_uarts was set to 0 (via config or 8250_core.nr_uarts), we crash
>> early on x86 because serial8250_isa_init_ports dereferences base_ops
>> which remains NULL. In fact, there is nothing to do for that function if
>> there are no uarts.
> 
> Thanks for finding this.
> 
> So nr_uarts == 0 effectively disables the 8250 driver. Is there any 
> reason not to simply abort the driver init instead?

I'm not very deep into this code, just stumbled over this while trying
some, well, unusual configurations.

If you prefer to handle this differently, I can recode it, of course.

Jan

-- 
Siemens AG, Corporate Technology, CT RTC ITP SES-DE
Corporate Competence Center Embedded Linux
--
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