Re: [PATCH] rpadlpar: fix potential drc_name corruption in store functions

2021-03-15 Thread Tyrel Datwyler
On 3/14/21 7:52 PM, Michael Ellerman wrote: > Tyrel Datwyler writes: >> On 3/13/21 1:17 AM, Michal Suchánek wrote: >>> On Wed, Mar 10, 2021 at 04:30:21PM -0600, Tyrel Datwyler wrote: Both add_slot_store() and remove_slot_store() try to fix up the drc_name copied from the store buffer by

Re: [PATCH] rpadlpar: fix potential drc_name corruption in store functions

2021-03-14 Thread Michael Ellerman
Tyrel Datwyler writes: > On 3/13/21 1:17 AM, Michal Suchánek wrote: >> On Wed, Mar 10, 2021 at 04:30:21PM -0600, Tyrel Datwyler wrote: >>> Both add_slot_store() and remove_slot_store() try to fix up the drc_name >>> copied from the store buffer by placing a NULL terminator at nbyte + 1 >>> or in p

Re: [PATCH] rpadlpar: fix potential drc_name corruption in store functions

2021-03-14 Thread Tyrel Datwyler
On 3/13/21 1:17 AM, Michal Suchánek wrote: > On Wed, Mar 10, 2021 at 04:30:21PM -0600, Tyrel Datwyler wrote: >> Both add_slot_store() and remove_slot_store() try to fix up the drc_name >> copied from the store buffer by placing a NULL terminator at nbyte + 1 >> or in place of a '\n' if present. How

Re: [PATCH] rpadlpar: fix potential drc_name corruption in store functions

2021-03-13 Thread Michal Suchánek
On Wed, Mar 10, 2021 at 04:30:21PM -0600, Tyrel Datwyler wrote: > Both add_slot_store() and remove_slot_store() try to fix up the drc_name > copied from the store buffer by placing a NULL terminator at nbyte + 1 > or in place of a '\n' if present. However, the static buffer that we > copy the drc_n

[PATCH] rpadlpar: fix potential drc_name corruption in store functions

2021-03-10 Thread Tyrel Datwyler
Both add_slot_store() and remove_slot_store() try to fix up the drc_name copied from the store buffer by placing a NULL terminator at nbyte + 1 or in place of a '\n' if present. However, the static buffer that we copy the drc_name data into is not zeored and can contain anything past the n-th byte.