<feed xmlns='http://www.w3.org/2005/Atom'>
<title>linux-stable.git/drivers/char/ipmi/ipmb_dev_int.c, branch linux-5.4.y</title>
<subtitle>Linux kernel stable tree</subtitle>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/'/>
<entry>
<title>ipmi: ipmb: Add check devm_kasprintf() returned value</title>
<updated>2025-03-13T11:42:53+00:00</updated>
<author>
<name>Charles Han</name>
<email>hanchunchao@inspur.com</email>
</author>
<published>2024-09-26T09:44:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=1a8a17c5ce9cb5a82797602bff9819ac732d2ff5'/>
<id>1a8a17c5ce9cb5a82797602bff9819ac732d2ff5</id>
<content type='text'>
[ Upstream commit 2378bd0b264ad3a1f76bd957caf33ee0c7945351 ]

devm_kasprintf() can return a NULL pointer on failure but this
returned value is not checked.

Fixes: 51bd6f291583 ("Add support for IPMB driver")
Signed-off-by: Charles Han &lt;hanchunchao@inspur.com&gt;
Message-ID: &lt;20240926094419.25900-1-hanchunchao@inspur.com&gt;
Signed-off-by: Corey Minyard &lt;corey@minyard.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
[ Upstream commit 2378bd0b264ad3a1f76bd957caf33ee0c7945351 ]

devm_kasprintf() can return a NULL pointer on failure but this
returned value is not checked.

Fixes: 51bd6f291583 ("Add support for IPMB driver")
Signed-off-by: Charles Han &lt;hanchunchao@inspur.com&gt;
Message-ID: &lt;20240926094419.25900-1-hanchunchao@inspur.com&gt;
Signed-off-by: Corey Minyard &lt;corey@minyard.net&gt;
Signed-off-by: Sasha Levin &lt;sashal@kernel.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>drivers: ipmi: fix off-by-one bounds check that leads to a out-of-bounds write</title>
<updated>2020-02-19T18:53:05+00:00</updated>
<author>
<name>Colin Ian King</name>
<email>colin.king@canonical.com</email>
</author>
<published>2020-01-14T14:40:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=cf0ea974b6a2c9308149f747db0ab30de1b5d36b'/>
<id>cf0ea974b6a2c9308149f747db0ab30de1b5d36b</id>
<content type='text'>
commit e0354d147e5889b5faa12e64fa38187aed39aad4 upstream.

The end of buffer check is off-by-one since the check is against
an index that is pre-incremented before a store to buf[]. Fix this
adjusting the bounds check appropriately.

Addresses-Coverity: ("Out-of-bounds write")
Fixes: 51bd6f291583 ("Add support for IPMB driver")
Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Message-Id: &lt;20200114144031.358003-1-colin.king@canonical.com&gt;
Reviewed-by: Asmaa Mnebhi &lt;asmaa@mellanox.com&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
commit e0354d147e5889b5faa12e64fa38187aed39aad4 upstream.

The end of buffer check is off-by-one since the check is against
an index that is pre-incremented before a store to buf[]. Fix this
adjusting the bounds check appropriately.

Addresses-Coverity: ("Out-of-bounds write")
Fixes: 51bd6f291583 ("Add support for IPMB driver")
Signed-off-by: Colin Ian King &lt;colin.king@canonical.com&gt;
Message-Id: &lt;20200114144031.358003-1-colin.king@canonical.com&gt;
Reviewed-by: Asmaa Mnebhi &lt;asmaa@mellanox.com&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</pre>
</div>
</content>
</entry>
<entry>
<title>Fix uninitialized variable in ipmb_dev_int.c</title>
<updated>2019-07-24T20:53:21+00:00</updated>
<author>
<name>Asmaa Mnebhi</name>
<email>Asmaa@mellanox.com</email>
</author>
<published>2019-07-24T19:32:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=71be7b0e7d4069822c89146daed800686db8f147'/>
<id>71be7b0e7d4069822c89146daed800686db8f147</id>
<content type='text'>
ret at line 112 of ipmb_dev_int.c is uninitialized which
results in a warning during build regressions.
This warning was found by build regression/improvement
testing for v5.3-rc1.

Reported-by: build regression/improvement testing for v5.3-rc1.
Fixes: 51bd6f291583 ("Add support for IPMB driver")
Signed-off-by: Asmaa Mnebhi &lt;Asmaa@mellanox.com&gt;
Message-Id: &lt;571dbb67cf58411d567953d9fb3739eb4789238b.1563996586.git.Asmaa@mellanox.com&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ret at line 112 of ipmb_dev_int.c is uninitialized which
results in a warning during build regressions.
This warning was found by build regression/improvement
testing for v5.3-rc1.

Reported-by: build regression/improvement testing for v5.3-rc1.
Fixes: 51bd6f291583 ("Add support for IPMB driver")
Signed-off-by: Asmaa Mnebhi &lt;Asmaa@mellanox.com&gt;
Message-Id: &lt;571dbb67cf58411d567953d9fb3739eb4789238b.1563996586.git.Asmaa@mellanox.com&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>fix platform_no_drv_owner.cocci warnings</title>
<updated>2019-06-23T21:16:52+00:00</updated>
<author>
<name>kbuild test robot</name>
<email>lkp@intel.com</email>
</author>
<published>2019-06-23T18:50:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=a88b6d5668bef303d01b706a35946bfc8e67402c'/>
<id>a88b6d5668bef303d01b706a35946bfc8e67402c</id>
<content type='text'>
drivers/char/ipmi/ipmb_dev_int.c:352:3-8: No need to set .owner here. The core will do it.

 Remove .owner field if calls are used which set it automatically

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

Fixes: 51bd6f291583 ("Add support for IPMB driver")
CC: Asmaa Mnebhi &lt;Asmaa@mellanox.com&gt;
Signed-off-by: kbuild test robot &lt;lkp@intel.com&gt;
Message-Id: &lt;20190623185044.GA94834@lkp-kbuild21&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
drivers/char/ipmi/ipmb_dev_int.c:352:3-8: No need to set .owner here. The core will do it.

 Remove .owner field if calls are used which set it automatically

Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci

Fixes: 51bd6f291583 ("Add support for IPMB driver")
CC: Asmaa Mnebhi &lt;Asmaa@mellanox.com&gt;
Signed-off-by: kbuild test robot &lt;lkp@intel.com&gt;
Message-Id: &lt;20190623185044.GA94834@lkp-kbuild21&gt;
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ipmi: ipmb: don't allocate i2c_client on stack</title>
<updated>2019-06-19T14:03:55+00:00</updated>
<author>
<name>Arnd Bergmann</name>
<email>arnd@arndb.de</email>
</author>
<published>2019-06-19T12:50:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=21feadd024e747123bc0aaba8d8cbef2b5eda058'/>
<id>21feadd024e747123bc0aaba8d8cbef2b5eda058</id>
<content type='text'>
The i2c_client structure can be fairly large, which leads to
a warning about possible kernel stack overflow in some
configurations:

drivers/char/ipmi/ipmb_dev_int.c:115:16: error: stack frame size of 1032 bytes in function 'ipmb_write' [-Werror,-Wframe-larger-than=]

There is no real reason to even declare an i2c_client, as we can simply
call i2c_smbus_xfer() directly instead of the i2c_smbus_write_block_data()
wrapper.

Convert the ipmb_write() to use an open-coded i2c_smbus_write_block_data()
here, without changing the behavior.

It seems that there is another problem with this implementation;
when user space passes a length of more than I2C_SMBUS_BLOCK_MAX
bytes, all the rest is silently ignored. This should probably be
addressed in a separate patch, but I don't know what the intended
behavior is here.

Fixes: 51bd6f291583 ("Add support for IPMB driver")
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Message-Id: &lt;20190619125045.918700-1-arnd@arndb.de&gt;
Acked-by: Asmaa Mnebhi &lt;Asmaa@mellanox.com&gt;
[Broke up a line &gt;80 characters on i2c_smbus_xfer().]
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The i2c_client structure can be fairly large, which leads to
a warning about possible kernel stack overflow in some
configurations:

drivers/char/ipmi/ipmb_dev_int.c:115:16: error: stack frame size of 1032 bytes in function 'ipmb_write' [-Werror,-Wframe-larger-than=]

There is no real reason to even declare an i2c_client, as we can simply
call i2c_smbus_xfer() directly instead of the i2c_smbus_write_block_data()
wrapper.

Convert the ipmb_write() to use an open-coded i2c_smbus_write_block_data()
here, without changing the behavior.

It seems that there is another problem with this implementation;
when user space passes a length of more than I2C_SMBUS_BLOCK_MAX
bytes, all the rest is silently ignored. This should probably be
addressed in a separate patch, but I don't know what the intended
behavior is here.

Fixes: 51bd6f291583 ("Add support for IPMB driver")
Signed-off-by: Arnd Bergmann &lt;arnd@arndb.de&gt;
Message-Id: &lt;20190619125045.918700-1-arnd@arndb.de&gt;
Acked-by: Asmaa Mnebhi &lt;Asmaa@mellanox.com&gt;
[Broke up a line &gt;80 characters on i2c_smbus_xfer().]
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Add support for IPMB driver</title>
<updated>2019-06-10T19:47:10+00:00</updated>
<author>
<name>Asmaa Mnebhi</name>
<email>Asmaa@mellanox.com</email>
</author>
<published>2019-06-10T18:57:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.tavy.me/linux-stable.git/commit/?id=51bd6f291583684f495ea498984dfc22049d7fd2'/>
<id>51bd6f291583684f495ea498984dfc22049d7fd2</id>
<content type='text'>
Support receiving IPMB requests on a Satellite MC from the BMC.
Once a response is ready, this driver will send back a response
to the BMC via the IPMB channel.

Signed-off-by: Asmaa Mnebhi &lt;Asmaa@mellanox.com&gt;
Acked-by: vadimp@mellanox.com
Message-Id: &lt;319690553a0da2a1e80b400941341081b383e5f1.1560192707.git.Asmaa@mellanox.com&gt;
[Move the config option to outside the ipmi msghandler, as it's not
 dependent on that.  Fixed one small whitespace issue.]
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Support receiving IPMB requests on a Satellite MC from the BMC.
Once a response is ready, this driver will send back a response
to the BMC via the IPMB channel.

Signed-off-by: Asmaa Mnebhi &lt;Asmaa@mellanox.com&gt;
Acked-by: vadimp@mellanox.com
Message-Id: &lt;319690553a0da2a1e80b400941341081b383e5f1.1560192707.git.Asmaa@mellanox.com&gt;
[Move the config option to outside the ipmi msghandler, as it's not
 dependent on that.  Fixed one small whitespace issue.]
Signed-off-by: Corey Minyard &lt;cminyard@mvista.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
