Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1719393

Re: [PATCH] of/device: Prevent buffer overflow in of_device_modalias()

From Rob Herring <robh+dt@kernel.org>
Newsgroups linux.kernel
Subject Re: [PATCH] of/device: Prevent buffer overflow in of_device_modalias()
Date 2017-08-24 18:30 +0200
Message-ID <ui3b4-tc-27@gated-at.bofh.it> (permalink)
References <uhOOK-81q-19@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Wed, Aug 23, 2017 at 8:04 PM, Bjorn Andersson
<bjorn.andersson@linaro.org> wrote:
> As of_device_get_modalias() returns the number of bytes that would have
> been written to the target string, regardless of how much did fit in the
> buffer, it's possible that the returned index points beyond the buffer
> passed to of_device_modalias() - causing memory beyond the buffer to be
> null terminated.

I guess ibmebus and macio had this bug for some time because I just
copied those implementations.

Applying both patches. Thanks.

Rob

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] of/device: Prevent buffer overflow in of_device_modalias() Bjorn Andersson <bjorn.andersson@linaro.org> - 2017-08-24 03:10 +0200
  Re: [PATCH] of/device: Prevent buffer overflow in of_device_modalias() Rob Herring <robh+dt@kernel.org> - 2017-08-24 18:30 +0200

csiph-web