Good Day
I Am Andrew Bailey Governor Bank of England (https://en.wikipedia.org/wiki/Andrew_Bailey_%28banker%29)
I have a proposal for you, if you know you can Handle this,
Contact me through my private email:(ande.bailey@mail2world.com)
with your full names and address, phone numbers for more details. I await your reply,
Regards,
Andrew Bailey.
Some SPI controller drivers unregister the controller in the shutdown
handler (e.g. BCM2835). If such a controller is used with a TPM 2 slave
chip->ops may be accessed when it is already NULL:
At system shutdown the pre-shutdown handler tpm_class_shutdown() shuts down
TPM 2 and sets chip->ops to NULL. Then at SPI controller unregistration
tpm_tis_spi_remove() is called and eventually calls tpm_del_char_device()
which tries to shut down TPM 2 again. Thereby it accesses chip->ops again:
(tpm_del_char_device calls tpm_chip_start which calls tpm_clk_enable which
calls chip->ops->clk_enable).
Avoid the NULL pointer access by testing if chip->ops is valid and skipping
the TPM 2 shutdown procedure in case it is NULL.
Fixes: dcbeab1946454 ("tpm: fix crash in tpm_tis deinitialization")
Cc: stable(a)vger.kernel.org
Signed-off-by: Lino Sanfilippo <LinoSanfilippo(a)gmx.de>
---
Changes to v2:
- rephrased the commit message to clarify the circumstances under which
this bug triggers (as requested by Jarkko)
I was able to reproduce this issue with a SLB 9670 TPM chip controlled by
a BCM2835 SPI controller.
The approach to fix this issue in the BCM2835 driver was rejected after a
discussion on the mailing list:
https://marc.info/?l=linux-integrity&m=163285906725367&w=2
The reason for the rejection was the realization, that this issue should rather
be fixed in the TPM code:
https://marc.info/?l=linux-spi&m=163311087423271&w=2
So this is the reworked version of a patch that is supposed to do that.
drivers/char/tpm/tpm-chip.c | 16 +++++++++++-----
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/drivers/char/tpm/tpm-chip.c b/drivers/char/tpm/tpm-chip.c
index ddaeceb7e109..7960da490e72 100644
--- a/drivers/char/tpm/tpm-chip.c
+++ b/drivers/char/tpm/tpm-chip.c
@@ -474,13 +474,19 @@ static void tpm_del_char_device(struct tpm_chip *chip)
/* Make the driver uncallable. */
down_write(&chip->ops_sem);
- if (chip->flags & TPM_CHIP_FLAG_TPM2) {
- if (!tpm_chip_start(chip)) {
- tpm2_shutdown(chip, TPM2_SU_CLEAR);
- tpm_chip_stop(chip);
+ /* Check if chip->ops is still valid: In case that the controller
+ * drivers shutdown handler unregisters the controller in its
+ * shutdown handler we are called twice and chip->ops to NULL.
+ */
+ if (chip->ops) {
+ if (chip->flags & TPM_CHIP_FLAG_TPM2) {
+ if (!tpm_chip_start(chip)) {
+ tpm2_shutdown(chip, TPM2_SU_CLEAR);
+ tpm_chip_stop(chip);
+ }
}
+ chip->ops = NULL;
}
- chip->ops = NULL;
up_write(&chip->ops_sem);
}
base-commit: a7904a538933c525096ca2ccde1e60d0ee62c08e
--
2.34.1
When an invalid (non exitsinting) handle is used in a tpm command,
that uses the resource manager interface (/dev/tpmrm0) the resource
manager tries to load it from its internal cache, but fails and
returns an -EINVAL error to the caller. The existing async handler
doesn't handle these error cases currently and the condition in the
poll handler never returns mask with EPOLLIN set causing the userspace
code to get stack. Make sure that error conditions also contribute
to the poll mask so that a correct error code could passed back
to the caller.
Cc: Jarkko Sakkinen <jarkko(a)kernel.org>
Cc: Jason Gunthorpe <jgg(a)ziepe.ca>
Cc: <linux-integrity(a)vger.kernel.org>
Cc: <stable(a)vger.kernel.org>
Cc: <linux-kernel(a)vger.kernel.org>
Fixes: 9e1b74a63f77 ("tpm: add support for nonblocking operation")
Signed-off-by: Tadeusz Struk <tstruk(a)gmail.com>
---
drivers/char/tpm/tpm-dev-common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/char/tpm/tpm-dev-common.c b/drivers/char/tpm/tpm-dev-common.c
index c08cbb306636..fe2679f84cb6 100644
--- a/drivers/char/tpm/tpm-dev-common.c
+++ b/drivers/char/tpm/tpm-dev-common.c
@@ -69,7 +69,7 @@ static void tpm_dev_async_work(struct work_struct *work)
ret = tpm_dev_transmit(priv->chip, priv->space, priv->data_buffer,
sizeof(priv->data_buffer));
tpm_put_ops(priv->chip);
- if (ret > 0) {
+ if (ret != 0) {
priv->response_length = ret;
mod_timer(&priv->user_read_timer, jiffies + (120 * HZ));
}
--
2.30.2
When using the tpm_tis-spi driver on a system missing the physical TPM,
a null pointer exception was observed.
[ 0.938677] Unable to handle kernel NULL pointer dereference at virtual address 00000004
[ 0.939020] pgd = 10c753cb
[ 0.939237] [00000004] *pgd=00000000
[ 0.939808] Internal error: Oops: 5 [#1] SMP ARM
[ 0.940157] CPU: 0 PID: 48 Comm: kworker/u4:1 Not tainted 5.15.10-dd1e40c #1
[ 0.940364] Hardware name: Generic DT based system
[ 0.940601] Workqueue: events_unbound async_run_entry_fn
[ 0.941048] PC is at tpm_tis_remove+0x28/0xb4
[ 0.941196] LR is at tpm_tis_core_init+0x170/0x6ac
This is due to an attempt in 'tpm_tis_remove' to use the drvdata, which
was not initialized in 'tpm_tis_core_init' prior to the first error.
Move the initialization of drvdata earlier so 'tpm_tis_remove' has
access to it.
Signed-off-by: Patrick Williams <patrick(a)stwcx.xyz>
Fixes: 79ca6f74dae0 ("tpm: fix Atmel TPM crash caused by too frequent queries")
Cc: stable(a)vger.kernel.org
---
drivers/char/tpm/tpm_tis_core.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/char/tpm/tpm_tis_core.c b/drivers/char/tpm/tpm_tis_core.c
index b2659a4c4016..9813b934e6e4 100644
--- a/drivers/char/tpm/tpm_tis_core.c
+++ b/drivers/char/tpm/tpm_tis_core.c
@@ -950,6 +950,8 @@ int tpm_tis_core_init(struct device *dev, struct tpm_tis_data *priv, int irq,
priv->timeout_max = TPM_TIMEOUT_USECS_MAX;
priv->phy_ops = phy_ops;
+ dev_set_drvdata(&chip->dev, priv);
+
rc = tpm_tis_read32(priv, TPM_DID_VID(0), &vendor);
if (rc < 0)
goto out_err;
@@ -962,8 +964,6 @@ int tpm_tis_core_init(struct device *dev, struct tpm_tis_data *priv, int irq,
priv->timeout_max = TIS_TIMEOUT_MAX_ATML;
}
- dev_set_drvdata(&chip->dev, priv);
-
if (is_bsw()) {
priv->ilb_base_addr = ioremap(INTEL_LEGACY_BLK_BASE_ADDR,
ILB_REMAP_SIZE);
--
2.32.0
Hello,
I wanted to see if I could have two patches backported to 5.15 stable
that concern Intel iwlwifi AX2XX stability.
The patches are attached to the kernel bugzilla that can be found
here: https://bugzilla.kernel.org/show_bug.cgi?id=214549. I've also
attached them to this email.
The patches fix an issue with the Intel AX210 that I have where it can
cause a firmware reset when the device is under load causing
performance to drop to around ~500Kb/s till the interface is
restarted. This reset is easy to reproduce during normal use such as
streaming videos and is problematic for devices such as laptops that
primarily use wifi for connectivity.
The mac80211 change is currently in the 5.16 RC and the scan timeout
is in netdev-next and is supposed to be scheduled for 5.17 from what I
can tell.
I believe that the patches meet the requirements of the -stable tree
as it makes the adapter for many users including myself difficult to
use reliably.
If this is the incorrect venue for this please let me know.
Thanks,
Kevin Anderson
Den 2021-12-28 kl. 02:59, skrev Kevin Anderson:
> Hello,
>
> I wanted to see if I could have two patches backported to 5.15 stable
> that concern Intel iwlwifi AX2XX stability.
>
> The patches are attached to the kernel bugzilla that can be found
> here: https://bugzilla.kernel.org/show_bug.cgi?id=214549. I've also
> attached them to this email.
>
> The patches fix an issue with the Intel AX210 that I have where it can
> cause a firmware reset when the device is under load causing
> performance to drop to around ~500Kb/s till the interface is
> restarted. This reset is easy to reproduce during normal use such as
> streaming videos and is problematic for devices such as laptops that
> primarily use wifi for connectivity.
>
> The mac80211 change is currently in the 5.16 RC and the scan timeout
> is in netdev-next and is supposed to be scheduled for 5.17 from what I
> can tell.
> > I believe that the patches meet the requirements of the -stable tree
> as it makes the adapter for many users including myself difficult to
> use reliably.
>
The mac80211 change was/is marked for stable@ and is already in 5.15.11
the scan timeout is only in a -next tree (as you already noted),
so it cant land in 5.15 stable until it is also in linus tree...
--
Thomas
This is the start of the stable review cycle for the 4.9.295 release.
There are 19 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Wed, 29 Dec 2021 15:13:09 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v4.x/stable-review/patch-4.9.295-rc…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.9.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 4.9.295-rc1
Rémi Denis-Courmont <remi(a)remlab.net>
phonet/pep: refuse to enable an unbound pipe
Lin Ma <linma(a)zju.edu.cn>
hamradio: improve the incomplete fix to avoid NPD
Lin Ma <linma(a)zju.edu.cn>
hamradio: defer ax25 kfree after unregister_netdev
Lin Ma <linma(a)zju.edu.cn>
ax25: NPD bug when detaching AX25 device
Guenter Roeck <linux(a)roeck-us.net>
hwmon: (lm90) Do not report 'busy' status bit as alarm
Samuel Čavoj <samuel(a)cavoj.net>
Input: i8042 - enable deferred probe quirk for ASUS UM325UA
Ard Biesheuvel <ardb(a)kernel.org>
ARM: 9169/1: entry: fix Thumb2 bug in iWMMXt exception handling
Andrew Cooper <andrew.cooper3(a)citrix.com>
x86/pkey: Fix undefined behaviour with PKRU_WD_BIT
Colin Ian King <colin.i.king(a)gmail.com>
ALSA: drivers: opl3: Fix incorrect use of vp->state
Xiaoke Wang <xkernel.wang(a)foxmail.com>
ALSA: jack: Check the return value of kstrdup()
Guenter Roeck <linux(a)roeck-us.net>
hwmon: (lm90) Fix usage of CONFIG2 register in detect function
Jiasheng Jiang <jiasheng(a)iscas.ac.cn>
drivers: net: smc911x: Check for error irq
Jiasheng Jiang <jiasheng(a)iscas.ac.cn>
fjes: Check for error irq
Fernando Fernandez Mancera <ffmancera(a)riseup.net>
bonding: fix ad_actor_system option setting to default
Jiasheng Jiang <jiasheng(a)iscas.ac.cn>
qlcnic: potential dereference null pointer of rx_queue->page_ring
José Expósito <jose.exposito89(a)gmail.com>
IB/qib: Fix memory leak in qib_user_sdma_queue_pkts()
Benjamin Tissoires <benjamin.tissoires(a)redhat.com>
HID: holtek: fix mouse probing
Jimmy Assarsson <extja(a)kvaser.com>
can: kvaser_usb: get CAN clock frequency from device
Greg Jesionowski <jesionowskigreg(a)gmail.com>
net: usb: lan78xx: add Allied Telesis AT29M2-AF
-------------
Diffstat:
Documentation/networking/bonding.txt | 11 +++---
Makefile | 4 +--
arch/arm/kernel/entry-armv.S | 8 ++---
arch/x86/include/asm/pgtable.h | 4 +--
drivers/hid/hid-holtek-mouse.c | 15 ++++++++
drivers/hwmon/lm90.c | 8 ++---
drivers/infiniband/hw/qib/qib_user_sdma.c | 2 +-
drivers/input/serio/i8042-x86ia64io.h | 7 ++++
drivers/net/bonding/bond_options.c | 2 +-
drivers/net/can/usb/kvaser_usb.c | 41 +++++++++++++++++++---
drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov.h | 2 +-
.../ethernet/qlogic/qlcnic/qlcnic_sriov_common.c | 12 +++++--
.../net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c | 4 ++-
drivers/net/ethernet/smsc/smc911x.c | 5 +++
drivers/net/fjes/fjes_main.c | 5 +++
drivers/net/hamradio/mkiss.c | 5 +--
drivers/net/usb/lan78xx.c | 6 ++++
net/ax25/af_ax25.c | 4 ++-
net/phonet/pep.c | 2 ++
sound/core/jack.c | 4 +++
sound/drivers/opl3/opl3_midi.c | 2 +-
21 files changed, 119 insertions(+), 34 deletions(-)
This is the start of the stable review cycle for the 5.4.169 release.
There are 47 patches in this series, all will be posted as a response
to this one. If anyone has any issues with these being applied, please
let me know.
Responses should be made by Wed, 29 Dec 2021 15:13:09 +0000.
Anything received after that time might be too late.
The whole patch series can be found in one patch at:
https://www.kernel.org/pub/linux/kernel/v5.x/stable-review/patch-5.4.169-rc…
or in the git tree and branch at:
git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-5.4.y
and the diffstat can be found below.
thanks,
greg k-h
-------------
Pseudo-Shortlog of commits:
Greg Kroah-Hartman <gregkh(a)linuxfoundation.org>
Linux 5.4.169-rc1
Rémi Denis-Courmont <remi(a)remlab.net>
phonet/pep: refuse to enable an unbound pipe
Lin Ma <linma(a)zju.edu.cn>
hamradio: improve the incomplete fix to avoid NPD
Lin Ma <linma(a)zju.edu.cn>
hamradio: defer ax25 kfree after unregister_netdev
Lin Ma <linma(a)zju.edu.cn>
ax25: NPD bug when detaching AX25 device
Guenter Roeck <linux(a)roeck-us.net>
hwmon: (lm90) Do not report 'busy' status bit as alarm
Guenter Roeck <linux(a)roeck-us.net>
hwmom: (lm90) Fix citical alarm status for MAX6680/MAX6681
Guodong Liu <guodong.liu(a)mediatek.corp-partner.google.com>
pinctrl: mediatek: fix global-out-of-bounds issue
Samuel Čavoj <samuel(a)cavoj.net>
Input: i8042 - enable deferred probe quirk for ASUS UM325UA
Andrey Ryabinin <arbn(a)yandex-team.com>
mm: mempolicy: fix THP allocations escaping mempolicy restrictions
Sean Christopherson <seanjc(a)google.com>
KVM: VMX: Fix stale docs for kvm-intel.emulate_invalid_guest_state
Marian Postevca <posteuca(a)mutex.one>
usb: gadget: u_ether: fix race in setting MAC address in setup phase
Chao Yu <chao(a)kernel.org>
f2fs: fix to do sanity check on last xattr entry in __f2fs_setxattr()
Sumit Garg <sumit.garg(a)linaro.org>
tee: optee: Fix incorrect page free bug
Ard Biesheuvel <ardb(a)kernel.org>
ARM: 9169/1: entry: fix Thumb2 bug in iWMMXt exception handling
Ulf Hansson <ulf.hansson(a)linaro.org>
mmc: core: Disable card detect during shutdown
Prathamesh Shete <pshete(a)nvidia.com>
mmc: sdhci-tegra: Fix switch to HS400ES mode
Fabien Dessenne <fabien.dessenne(a)foss.st.com>
pinctrl: stm32: consider the GPIO offset to expose all the GPIO lines
Andrew Cooper <andrew.cooper3(a)citrix.com>
x86/pkey: Fix undefined behaviour with PKRU_WD_BIT
John David Anglin <dave.anglin(a)bell.net>
parisc: Correct completer in lws start
Thadeu Lima de Souza Cascardo <cascardo(a)canonical.com>
ipmi: fix initialization when workqueue allocation fails
Mian Yousaf Kaukab <ykaukab(a)suse.de>
ipmi: ssif: initialize ssif_info->client early
Thadeu Lima de Souza Cascardo <cascardo(a)canonical.com>
ipmi: bail out if init_srcu_struct fails
José Expósito <jose.exposito89(a)gmail.com>
Input: atmel_mxt_ts - fix double free in mxt_read_info_block
Bradley Scott <Bradley.Scott(a)zebra.com>
ALSA: hda/realtek: Amp init fixup for HP ZBook 15 G6
Colin Ian King <colin.i.king(a)gmail.com>
ALSA: drivers: opl3: Fix incorrect use of vp->state
Xiaoke Wang <xkernel.wang(a)foxmail.com>
ALSA: jack: Check the return value of kstrdup()
Guenter Roeck <linux(a)roeck-us.net>
hwmon: (lm90) Drop critical attribute support for MAX6654
Guenter Roeck <linux(a)roeck-us.net>
hwmon: (lm90) Introduce flag indicating extended temperature support
Guenter Roeck <linux(a)roeck-us.net>
hwmon: (lm90) Add basic support for TI TMP461
Josh Lehan <krellan(a)google.com>
hwmon: (lm90) Add max6654 support to lm90 driver
Guenter Roeck <linux(a)roeck-us.net>
hwmon: (lm90) Fix usage of CONFIG2 register in detect function
Andrea Righi <andrea.righi(a)canonical.com>
Input: elantech - fix stack out of bound access in elantech_change_report_id()
Jiasheng Jiang <jiasheng(a)iscas.ac.cn>
sfc: falcon: Check null pointer of rx_queue->page_ring
Jiasheng Jiang <jiasheng(a)iscas.ac.cn>
drivers: net: smc911x: Check for error irq
Jiasheng Jiang <jiasheng(a)iscas.ac.cn>
fjes: Check for error irq
Fernando Fernandez Mancera <ffmancera(a)riseup.net>
bonding: fix ad_actor_system option setting to default
Wu Bo <wubo40(a)huawei.com>
ipmi: Fix UAF when uninstall ipmi_si and ipmi_msghandler module
Willem de Bruijn <willemb(a)google.com>
net: skip virtio_net_hdr_set_proto if protocol already set
Willem de Bruijn <willemb(a)google.com>
net: accept UFOv6 packages in virtio_net_hdr_to_skb
Jiasheng Jiang <jiasheng(a)iscas.ac.cn>
qlcnic: potential dereference null pointer of rx_queue->page_ring
Ignacy Gawędzki <ignacy.gawedzki(a)green-communications.fr>
netfilter: fix regression in looped (broad|multi)cast's MAC handling
José Expósito <jose.exposito89(a)gmail.com>
IB/qib: Fix memory leak in qib_user_sdma_queue_pkts()
Dongliang Mu <mudongliangabcd(a)gmail.com>
spi: change clk_disable_unprepare to clk_unprepare
Robert Marko <robert.marko(a)sartura.hr>
arm64: dts: allwinner: orangepi-zero-plus: fix PHY mode
Benjamin Tissoires <benjamin.tissoires(a)redhat.com>
HID: holtek: fix mouse probing
Ji-Ze Hong (Peter Hong) <hpeter(a)gmail.com>
serial: 8250_fintek: Fix garbled text for console
Greg Jesionowski <jesionowskigreg(a)gmail.com>
net: usb: lan78xx: add Allied Telesis AT29M2-AF
-------------
Diffstat:
Documentation/admin-guide/kernel-parameters.txt | 8 +-
Documentation/hwmon/lm90.rst | 33 +++-
Documentation/networking/bonding.txt | 11 +-
Makefile | 4 +-
arch/arm/kernel/entry-armv.S | 8 +-
.../dts/allwinner/sun50i-h5-orangepi-zero-plus.dts | 2 +-
arch/parisc/kernel/syscall.S | 2 +-
arch/x86/include/asm/pgtable.h | 4 +-
drivers/char/ipmi/ipmi_msghandler.c | 21 ++-
drivers/char/ipmi/ipmi_ssif.c | 7 +-
drivers/hid/hid-holtek-mouse.c | 15 ++
drivers/hwmon/Kconfig | 9 +-
drivers/hwmon/lm90.c | 200 ++++++++++++++-------
drivers/infiniband/hw/qib/qib_user_sdma.c | 2 +-
drivers/input/mouse/elantech.c | 8 +-
drivers/input/serio/i8042-x86ia64io.h | 7 +
drivers/input/touchscreen/atmel_mxt_ts.c | 2 +-
drivers/mmc/core/core.c | 7 +-
drivers/mmc/core/core.h | 1 +
drivers/mmc/core/host.c | 9 +
drivers/mmc/host/sdhci-tegra.c | 43 +++--
drivers/net/bonding/bond_options.c | 2 +-
drivers/net/ethernet/qlogic/qlcnic/qlcnic_sriov.h | 2 +-
.../ethernet/qlogic/qlcnic/qlcnic_sriov_common.c | 12 +-
.../net/ethernet/qlogic/qlcnic/qlcnic_sriov_pf.c | 4 +-
drivers/net/ethernet/sfc/falcon/rx.c | 5 +-
drivers/net/ethernet/smsc/smc911x.c | 5 +
drivers/net/fjes/fjes_main.c | 5 +
drivers/net/hamradio/mkiss.c | 5 +-
drivers/net/usb/lan78xx.c | 6 +
drivers/pinctrl/mediatek/pinctrl-mtk-common-v2.c | 8 +-
drivers/pinctrl/stm32/pinctrl-stm32.c | 8 +-
drivers/spi/spi-armada-3700.c | 2 +-
drivers/tee/optee/shm_pool.c | 6 +-
drivers/tty/serial/8250/8250_fintek.c | 19 --
drivers/usb/gadget/function/u_ether.c | 15 +-
fs/f2fs/xattr.c | 11 +-
include/linux/virtio_net.h | 25 ++-
mm/mempolicy.c | 5 +-
net/ax25/af_ax25.c | 4 +-
net/netfilter/nfnetlink_log.c | 3 +-
net/netfilter/nfnetlink_queue.c | 3 +-
net/phonet/pep.c | 2 +
sound/core/jack.c | 4 +
sound/drivers/opl3/opl3_midi.c | 2 +-
sound/pci/hda/patch_realtek.c | 1 +
46 files changed, 393 insertions(+), 174 deletions(-)