Commit graph

5505 commits

Author SHA1 Message Date
Chenglu Lin
8979260098 kernel: Add CC_WERROR config to turn warnings into errors
Add configuration option CONFIG_CC_WERROR to prevent warnings
from creeping in.

Bug: 141372918
Change-Id: Ie2d067c0177d8f13e9aaa9a78867998e390f89ee
Signed-off-by: Chenglu Lin <chenglulin@google.com>
2023-12-22 23:09:07 +00:00
Michael Bestas
33ef102789
Merge tag 'ASB-2023-12-05_4.19-stable' of https://android.googlesource.com/kernel/common into android13-4.19-kona
https://source.android.com/docs/security/bulletin/2023-12-01

* tag 'ASB-2023-12-05_4.19-stable' of https://android.googlesource.com/kernel/common:
  Revert "macsec: use DEV_STATS_INC()"
  Revert "net: add DEV_STATS_READ() helper"
  Linux 4.19.300
  net: sched: fix race condition in qdisc_graft()
  iomap: Set all uptodate bits for an Uptodate page
  scsi: virtio_scsi: limit number of hw queues by nr_cpu_ids
  drm/amdgpu: fix error handling in amdgpu_bo_list_get()
  ext4: remove gdb backup copy for meta bg in setup_new_flex_group_blocks
  ext4: correct return value of ext4_convert_meta_bg
  ext4: correct offset of gdb backup in non meta_bg group to update_backups
  ext4: apply umask if ACL support is disabled
  Revert "net: r8169: Disable multicast filter for RTL8168H and RTL8107E"
  media: venus: hfi: add checks to handle capabilities from firmware
  media: venus: hfi: fix the check to handle session buffer requirement
  media: venus: hfi_parser: Add check to keep the number of codecs within range
  media: sharp: fix sharp encoding
  media: lirc: drop trailing space from scancode transmit
  i2c: i801: fix potential race in i801_block_transaction_byte_by_byte
  net: dsa: lan9303: consequently nested-lock physical MDIO
  tty: serial: meson: fix hard LOCKUP on crtscts mode
  serial: meson: Use platform_get_irq() to get the interrupt
  tty: serial: meson: retrieve port FIFO size from DT
  serial: meson: remove redundant initialization of variable id
  tty: serial: meson: if no alias specified use an available id
  ALSA: hda/realtek - Enable internal speaker of ASUS K6500ZC
  ALSA: info: Fix potential deadlock at disconnection
  parisc/pgtable: Do not drop upper 5 address bits of physical address
  parisc: Prevent booting 64-bit kernels on PA1.x machines
  dmaengine: stm32-mdma: correct desc prep when channel running
  mcb: fix error handling for different scenarios when parsing
  quota: explicitly forbid quota files from being encrypted
  jbd2: fix potential data lost in recovering journal raced with synchronizing fs bdev
  PM: hibernate: Clean up sync_read handling in snapshot_write_next()
  PM: hibernate: Use __get_safe_page() rather than touching the list
  mmc: vub300: fix an error code
  clk: qcom: ipq8074: drop the CLK_SET_RATE_PARENT flag from PLL clocks
  parisc/pdc: Add width field to struct pdc_model
  PCI: keystone: Don't discard .probe() callback
  PCI: keystone: Don't discard .remove() callback
  genirq/generic_chip: Make irq_remove_generic_chip() irqdomain aware
  mmc: meson-gx: Remove setting of CMD_CFG_ERROR
  PCI/sysfs: Protect driver's D3cold preference from user space
  hvc/xen: fix error path in xen_hvc_init() to always register frontend driver
  audit: don't WARN_ON_ONCE(!current->mm) in audit_exe_compare()
  audit: don't take task_lock() in audit_exe_compare() code path
  KVM: x86: Ignore MSR_AMD64_TW_CFG access
  randstruct: Fix gcc-plugin performance mode to stay in group
  media: venus: hfi: add checks to perform sanity on queue pointers
  cifs: spnego: add ';' in HOST_KEY_LEN
  macvlan: Don't propagate promisc change to lower dev in passthru
  net: ethernet: cortina: Fix MTU max setting
  net: ethernet: cortina: Handle large frames
  net: ethernet: cortina: Fix max RX frame define
  ptp: annotate data-race around q->head and q->tail
  xen/events: fix delayed eoi list handling
  ppp: limit MRU to 64K
  tipc: Fix kernel-infoleak due to uninitialized TLV value
  tty: Fix uninit-value access in ppp_sync_receive()
  ipvlan: add ipvlan_route_v6_outbound() helper
  NFSv4.1: fix SP4_MACH_CRED protection for pnfs IO
  pwm: Fix double shift bug
  drm/amd/display: Avoid NULL dereference of timing generator
  gfs2: ignore negated quota changes
  media: vivid: avoid integer overflow
  media: gspca: cpia1: shift-out-of-bounds in set_flicker
  i2c: sun6i-p2wi: Prevent potential division by zero
  usb: gadget: f_ncm: Always set current gadget in ncm_bind()
  tty: vcc: Add check for kstrdup() in vcc_probe()
  HID: Add quirk for Dell Pro Wireless Keyboard and Mouse KM5221W
  scsi: libfc: Fix potential NULL pointer dereference in fc_lport_ptp_setup()
  atm: iphase: Do PCI error checks on own line
  ALSA: hda: Fix possible null-ptr-deref when assigning a stream
  ARM: 9320/1: fix stack depot IRQ stack filter
  jfs: fix array-index-out-of-bounds in diAlloc
  jfs: fix array-index-out-of-bounds in dbFindLeaf
  fs/jfs: Add validity check for db_maxag and db_agpref
  fs/jfs: Add check for negative db_l2nbperpage
  RDMA/hfi1: Use FIELD_GET() to extract Link Width
  crypto: pcrypt - Fix hungtask for PADATA_RESET
  selftests/efivarfs: create-read: fix a resource leak
  drm/amdgpu: Fix a null pointer access when the smc_rreg pointer is NULL
  drm/amd: Fix UBSAN array-index-out-of-bounds for Polaris and Tonga
  drm/amd: Fix UBSAN array-index-out-of-bounds for SMU7
  platform/x86: thinkpad_acpi: Add battery quirk for Thinkpad X120e
  Bluetooth: Fix double free in hci_conn_cleanup
  net: annotate data-races around sk->sk_dst_pending_confirm
  net: annotate data-races around sk->sk_tx_queue_mapping
  wifi: ath10k: fix clang-specific fortify warning
  wifi: ath9k: fix clang-specific fortify warnings
  wifi: mac80211: don't return unset power in ieee80211_get_tx_power()
  x86/mm: Drop the 4 MB restriction on minimal NUMA node memory size
  clocksource/drivers/timer-atmel-tcb: Fix initialization on SAM9 hardware
  clocksource/drivers/timer-imx-gpt: Fix potential memory leak
  perf/core: Bail out early if the request AUX area is out of bound
  locking/ww_mutex/test: Fix potential workqueue corruption
  Revert "ipvlan: properly track tx_errors"
  ANDROID: fix up platform_device ABI break
  Linux 4.19.299
  btrfs: use u64 for buffer sizes in the tree search ioctls
  Revert "mmc: core: Capture correct oemid-bits for eMMC cards"
  fbdev: fsl-diu-fb: mark wr_reg_wa() static
  fbdev: imsttfb: fix a resource leak in probe
  fbdev: imsttfb: Fix error path of imsttfb_probe()
  netfilter: xt_recent: fix (increase) ipv6 literal buffer length
  r8169: respect userspace disabling IFF_MULTICAST
  tg3: power down device only on SYSTEM_POWER_OFF
  net/smc: fix dangling sock under state SMC_APPFINCLOSEWAIT
  net/smc: wait for pending work before clcsock release_sock
  net/smc: postpone release of clcsock
  net: r8169: Disable multicast filter for RTL8168H and RTL8107E
  r8169: improve rtl_set_rx_mode
  dccp/tcp: Call security_inet_conn_request() after setting IPv6 addresses.
  dccp: Call security_inet_conn_request() after setting IPv4 addresses.
  tipc: Change nla_policy for bearer-related names to NLA_NUL_STRING
  llc: verify mac len before reading mac header
  Input: synaptics-rmi4 - fix use after free in rmi_unregister_function()
  pwm: brcmstb: Utilize appropriate clock APIs in suspend/resume
  pwm: sti: Reduce number of allocations and drop usage of chip_data
  pwm: sti: Avoid conditional gotos
  media: dvb-usb-v2: af9035: fix missing unlock
  media: s3c-camif: Avoid inappropriate kfree()
  media: bttv: fix use after free error due to btv->timeout timer
  pcmcia: ds: fix possible name leak in error path in pcmcia_device_add()
  pcmcia: ds: fix refcount leak in pcmcia_device_add()
  pcmcia: cs: fix possible hung task and memory leak pccardd()
  f2fs: fix to initialize map.m_pblk in f2fs_precache_extents()
  dmaengine: pxa_dma: Remove an erroneous BUG_ON() in pxad_free_desc()
  USB: usbip: fix stub_dev hub disconnect
  tools: iio: iio_generic_buffer ensure alignment
  tools: iio: iio_generic_buffer: Fix some integer type and calculation
  tools: iio: privatize globals and functions in iio_generic_buffer.c file
  misc: st_core: Do not call kfree_skb() under spin_lock_irqsave()
  dmaengine: ti: edma: handle irq_of_parse_and_map() errors
  usb: dwc2: fix possible NULL pointer dereference caused by driver concurrency
  tty: tty_jobctrl: fix pid memleak in disassociate_ctty()
  leds: trigger: ledtrig-cpu:: Fix 'output may be truncated' issue for 'cpu'
  ledtrig-cpu: Limit to 8 CPUs
  leds: pwm: Don't disable the PWM when the LED should be off
  leds: pwm: convert to atomic PWM API
  leds: pwm: simplify if condition
  mfd: dln2: Fix double put in dln2_probe
  ASoC: ams-delta.c: use component after check
  ASoC: Intel: Skylake: Fix mem leak when parsing UUIDs fails
  sh: bios: Revive earlyprintk support
  RDMA/hfi1: Workaround truncation compilation error
  ext4: move 'ix' sanity check to corrent position
  ARM: 9321/1: memset: cast the constant byte to unsigned char
  hid: cp2112: Fix duplicate workqueue initialization
  HID: cp2112: Use irqchip template
  nd_btt: Make BTT lanes preemptible
  sched/rt: Provide migrate_disable/enable() inlines
  hwrng: geode - fix accessing registers
  clk: scmi: Free scmi_clk allocated when the clocks with invalid info are skipped
  firmware: ti_sci: Mark driver as non removable
  ARM: dts: qcom: mdm9615: populate vsdcc fixed regulator
  drm/rockchip: cdn-dp: Fix some error handling paths in cdn_dp_probe()
  drm/radeon: possible buffer overflow
  drm/rockchip: vop: Fix reset of state in duplicate state crtc funcs
  hwmon: (coretemp) Fix potentially truncated sysfs attribute name
  platform/x86: wmi: Fix opening of char device
  platform/x86: wmi: remove unnecessary initializations
  platform/x86: wmi: Fix probe failure when failing to register WMI devices
  clk: mediatek: clk-mt2701: Add check for mtk_alloc_clk_data
  clk: mediatek: clk-mt6797: Add check for mtk_alloc_clk_data
  clk: npcm7xx: Fix incorrect kfree
  clk: keystone: pll: fix a couple NULL vs IS_ERR() checks
  clk: qcom: clk-rcg2: Fix clock rate overflow for high parent frequencies
  regmap: debugfs: Fix a erroneous check after snprintf()
  ipvlan: properly track tx_errors
  net: add DEV_STATS_READ() helper
  macsec: use DEV_STATS_INC()
  macsec: Fix traffic counters/statistics
  ipv6: avoid atomic fragment on GSO packets
  ACPI: sysfs: Fix create_pnp_modalias() and create_of_modalias()
  chtls: fix tp->rcv_tstamp initialization
  thermal: core: prevent potential string overflow
  can: dev: can_restart(): fix race condition between controller restart and netif_carrier_on()
  can: dev: can_restart(): don't crash kernel if carrier is OK
  can: dev: move driver related infrastructure into separate subdir
  wifi: rtlwifi: fix EDCA limit set by BT coexistence
  tcp_metrics: do not create an entry from tcp_init_metrics()
  tcp_metrics: properly set tp->snd_ssthresh in tcp_init_metrics()
  tcp_metrics: add missing barriers on delete
  i40e: fix potential memory leaks in i40e_remove()
  genirq/matrix: Exclude managed interrupts in irq_matrix_allocated()
  vfs: fix readahead(2) on block devices
  Linux 4.19.298
  tty: 8250: Add support for Intashield IS-100
  tty: 8250: Add support for Brainboxes UP cards
  tty: 8250: Add support for additional Brainboxes UC cards
  tty: 8250: Remove UC-257 and UC-431
  usb: storage: set 1.50 as the lower bcdDevice for older "Super Top" compatibility
  PCI: Prevent xHCI driver from claiming AMD VanGogh USB3 DRD device
  remove the sx8 block driver
  ata: ahci: fix enum constants for gcc-13
  net: chelsio: cxgb4: add an error code check in t4_load_phy_fw
  platform/x86: asus-wmi: Change ASUS_WMI_BRN_DOWN code from 0x20 to 0x2e
  scsi: mpt3sas: Fix in error path
  fbdev: uvesafb: Call cn_del_callback() at the end of uvesafb_exit()
  ASoC: rt5650: fix the wrong result of key button
  netfilter: nfnetlink_log: silence bogus compiler warning
  fbdev: atyfb: only use ioremap_uc() on i386 and ia64
  Input: synaptics-rmi4 - handle reset delay when using SMBus trsnsport
  dmaengine: ste_dma40: Fix PM disable depth imbalance in d40_probe
  irqchip/stm32-exti: add missing DT IRQ flag translation
  Input: i8042 - add Fujitsu Lifebook E5411 to i8042 quirk table
  ASoC: simple-card: fixup asoc_simple_probe() error handling
  MAINTAINERS: r8169: Update path to the driver
  x86: Fix .brk attribute in linker script
  rpmsg: Fix possible refcount leak in rpmsg_register_device_override()
  rpmsg: glink: Release driver_override
  rpmsg: Fix calling device_lock() on non-initialized device
  rpmsg: Fix kfree() of static memory on setting driver_override
  rpmsg: Constify local variable in field store macro
  driver: platform: Add helper for safer setting of driver_override
  x86/mm: Fix RESERVE_BRK() for older binutils
  x86/mm: Simplify RESERVE_BRK()
  nfsd: lock_rename() needs both directories to live on the same fs
  f2fs: fix to do sanity check on inode type during garbage collection
  smbdirect: missing rc checks while waiting for rdma events
  kobject: Fix slab-out-of-bounds in fill_kobj_path()
  arm64: fix a concurrency issue in emulation_proc_handler()
  drm/dp_mst: Fix NULL deref in get_mst_branch_device_by_guid_helper()
  ARM: 8933/1: replace Sun/Solaris style flag on section directive
  NFS: Don't call generic_error_remove_page() while holding locks
  x86/i8259: Skip probing when ACPI/MADT advertises PCAT compatibility
  iio: exynos-adc: request second interupt only when touchscreen mode is used
  perf/core: Fix potential NULL deref
  nvmem: imx: correct nregs for i.MX6UL
  nvmem: imx: correct nregs for i.MX6SLL
  i2c: stm32f7: Fix PEC handling in case of SMBUS transfers
  i2c: muxes: i2c-demux-pinctrl: Use of_get_i2c_adapter_by_node()
  i2c: muxes: i2c-mux-gpmux: Use of_get_i2c_adapter_by_node()
  i2c: muxes: i2c-mux-pinctrl: Use of_get_i2c_adapter_by_node()
  i40e: Fix wrong check for I40E_TXR_FLAGS_WB_ON_ITR
  gtp: fix fragmentation needed check with gso
  igb: Fix potential memory leak in igb_add_ethtool_nfc_entry
  treewide: Spelling fix in comment
  r8169: fix the KCSAN reported data race in rtl_rx while reading desc->opts1
  r8169: fix the KCSAN reported data-race in rtl_tx while reading TxDescArray[entry].opts1
  r8169: rename r8169.c to r8169_main.c
  virtio-mmio: fix memory leak of vm_dev
  virtio_balloon: Fix endless deflation and inflation on arm64
  mcb-lpc: Reallocate memory region to avoid memory overlapping
  mcb: Return actual parsed size when reading chameleon table
  selftests/ftrace: Add new test case which checks non unique symbol
  mmc: core: sdio: hold retuning if sdio in 1-bit mode
  mmc: sdio: Don't re-initialize powered-on removable SDIO cards at resume

 Conflicts:
	drivers/clk/qcom/clk-rcg2.c
	drivers/leds/leds-pwm.c
	drivers/mmc/core/sdio.c
	drivers/rpmsg/qcom_glink_native.c
	drivers/thermal/thermal_core.c
	drivers/usb/gadget/function/f_ncm.c

Change-Id: I230a2c820e39dd863a874bfc0c7a411896b0ba9c
2023-12-14 13:13:51 +02:00
Greg Kroah-Hartman
4f5e88e555 This is the 4.19.298 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmVLYWMACgkQONu9yGCS
 aT7TWxAArWfLx5B55f2sGj/cDvs2xil315t1p/uhXCtgcstc/E+lxRipw3Bi3B0g
 IwoBHoxteAhHVzscTJUypzi/lzNdKuIoNvtD/IxpIt/vcP2T/JMBVzrMTsClGkDI
 xnaMq51lWT6Kpc3zt0k4EeAA9ifAeM45kIbZlPooJ15D6zuCLLMGdKiai8eYbOkM
 X65dzw2FxtCvIP3FfBxr4opRsWmkXSxD7diRVe4XPE/RyLFePPMitFg/NvpK/QLW
 +3aR6n0hhafvsYBE3T2+mb2A408uK7nT4aup25k9JF/RKhSzU2ZKTTZEtp92pZBr
 pHiUGa2bitYryBvSt69wRRamqctonrwXcW0FCAX+JxxujcfBmSR/z1GudQEbKBm8
 ALY2vgoDHeilbVxUCVGqnBpvu8NgwBw7J3z5S5m913X2CtMpeotvGzgksEE+gzdV
 Dw+l6bhj0vxAveYEgA5WVritymrh9NFNPQh32zeMG6FCcQCzuUd3gZPDECjcgFji
 keK3e71vjVemvgsvwAyx1WPpD0KDwjqZCAUL39Zmc7gQUzLZx8E2ujTIabefwJIA
 L3RQHFsVE141FojccKFpHhF/5ne6qAv74ZlXz0DBxstgx/acUCxqN7XJSVZw7OHN
 bpF3F3KNv1xOpN28rh+4Qjzds4TKQ+de9OEVJA3ZG2QuUqoFWXE=
 =013M
 -----END PGP SIGNATURE-----

Merge 4.19.298 into android-4.19-stable

Changes in 4.19.298
	mmc: sdio: Don't re-initialize powered-on removable SDIO cards at resume
	mmc: core: sdio: hold retuning if sdio in 1-bit mode
	selftests/ftrace: Add new test case which checks non unique symbol
	mcb: Return actual parsed size when reading chameleon table
	mcb-lpc: Reallocate memory region to avoid memory overlapping
	virtio_balloon: Fix endless deflation and inflation on arm64
	virtio-mmio: fix memory leak of vm_dev
	r8169: rename r8169.c to r8169_main.c
	r8169: fix the KCSAN reported data-race in rtl_tx while reading TxDescArray[entry].opts1
	r8169: fix the KCSAN reported data race in rtl_rx while reading desc->opts1
	treewide: Spelling fix in comment
	igb: Fix potential memory leak in igb_add_ethtool_nfc_entry
	gtp: fix fragmentation needed check with gso
	i40e: Fix wrong check for I40E_TXR_FLAGS_WB_ON_ITR
	i2c: muxes: i2c-mux-pinctrl: Use of_get_i2c_adapter_by_node()
	i2c: muxes: i2c-mux-gpmux: Use of_get_i2c_adapter_by_node()
	i2c: muxes: i2c-demux-pinctrl: Use of_get_i2c_adapter_by_node()
	i2c: stm32f7: Fix PEC handling in case of SMBUS transfers
	nvmem: imx: correct nregs for i.MX6SLL
	nvmem: imx: correct nregs for i.MX6UL
	perf/core: Fix potential NULL deref
	iio: exynos-adc: request second interupt only when touchscreen mode is used
	x86/i8259: Skip probing when ACPI/MADT advertises PCAT compatibility
	NFS: Don't call generic_error_remove_page() while holding locks
	ARM: 8933/1: replace Sun/Solaris style flag on section directive
	drm/dp_mst: Fix NULL deref in get_mst_branch_device_by_guid_helper()
	arm64: fix a concurrency issue in emulation_proc_handler()
	kobject: Fix slab-out-of-bounds in fill_kobj_path()
	smbdirect: missing rc checks while waiting for rdma events
	f2fs: fix to do sanity check on inode type during garbage collection
	nfsd: lock_rename() needs both directories to live on the same fs
	x86/mm: Simplify RESERVE_BRK()
	x86/mm: Fix RESERVE_BRK() for older binutils
	driver: platform: Add helper for safer setting of driver_override
	rpmsg: Constify local variable in field store macro
	rpmsg: Fix kfree() of static memory on setting driver_override
	rpmsg: Fix calling device_lock() on non-initialized device
	rpmsg: glink: Release driver_override
	rpmsg: Fix possible refcount leak in rpmsg_register_device_override()
	x86: Fix .brk attribute in linker script
	MAINTAINERS: r8169: Update path to the driver
	ASoC: simple-card: fixup asoc_simple_probe() error handling
	Input: i8042 - add Fujitsu Lifebook E5411 to i8042 quirk table
	irqchip/stm32-exti: add missing DT IRQ flag translation
	dmaengine: ste_dma40: Fix PM disable depth imbalance in d40_probe
	Input: synaptics-rmi4 - handle reset delay when using SMBus trsnsport
	fbdev: atyfb: only use ioremap_uc() on i386 and ia64
	netfilter: nfnetlink_log: silence bogus compiler warning
	ASoC: rt5650: fix the wrong result of key button
	fbdev: uvesafb: Call cn_del_callback() at the end of uvesafb_exit()
	scsi: mpt3sas: Fix in error path
	platform/x86: asus-wmi: Change ASUS_WMI_BRN_DOWN code from 0x20 to 0x2e
	net: chelsio: cxgb4: add an error code check in t4_load_phy_fw
	ata: ahci: fix enum constants for gcc-13
	remove the sx8 block driver
	PCI: Prevent xHCI driver from claiming AMD VanGogh USB3 DRD device
	usb: storage: set 1.50 as the lower bcdDevice for older "Super Top" compatibility
	tty: 8250: Remove UC-257 and UC-431
	tty: 8250: Add support for additional Brainboxes UC cards
	tty: 8250: Add support for Brainboxes UP cards
	tty: 8250: Add support for Intashield IS-100
	Linux 4.19.298

Change-Id: Ifb32a27a5d614f8234d0fb282c57304fdd2ce5de
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-11-08 11:10:34 +00:00
Wang Hai
0af6c6c156 kobject: Fix slab-out-of-bounds in fill_kobj_path()
commit 3bb2a01caa813d3a1845d378bbe4169ef280d394 upstream.

In kobject_get_path(), if kobj->name is changed between calls
get_kobj_path_length() and fill_kobj_path() and the length becomes
longer, then fill_kobj_path() will have an out-of-bounds bug.

The actual current problem occurs when the ixgbe probe.

In ixgbe_mii_bus_init(), if the length of netdev->dev.kobj.name
length becomes longer, out-of-bounds will occur.

cpu0                                         cpu1
ixgbe_probe
 register_netdev(netdev)
  netdev_register_kobject
   device_add
    kobject_uevent // Sending ADD events
                                             systemd-udevd // rename netdev
                                              dev_change_name
                                               device_rename
                                                kobject_rename
 ixgbe_mii_bus_init                             |
  mdiobus_register                              |
   __mdiobus_register                           |
    device_register                             |
     device_add                                 |
      kobject_uevent                            |
       kobject_get_path                         |
        len = get_kobj_path_length // old name  |
        path = kzalloc(len, gfp_mask);          |
                                                kobj->name = name;
                                                /* name length becomes
                                                 * longer
                                                 */
        fill_kobj_path /* kobj path length is
                        * longer than path,
                        * resulting in out of
                        * bounds when filling path
                        */

This is the kasan report:

==================================================================
BUG: KASAN: slab-out-of-bounds in fill_kobj_path+0x50/0xc0
Write of size 7 at addr ff1100090573d1fd by task kworker/28:1/673

 Workqueue: events work_for_cpu_fn
 Call Trace:
 <TASK>
 dump_stack_lvl+0x34/0x48
 print_address_description.constprop.0+0x86/0x1e7
 print_report+0x36/0x4f
 kasan_report+0xad/0x130
 kasan_check_range+0x35/0x1c0
 memcpy+0x39/0x60
 fill_kobj_path+0x50/0xc0
 kobject_get_path+0x5a/0xc0
 kobject_uevent_env+0x140/0x460
 device_add+0x5c7/0x910
 __mdiobus_register+0x14e/0x490
 ixgbe_probe.cold+0x441/0x574 [ixgbe]
 local_pci_probe+0x78/0xc0
 work_for_cpu_fn+0x26/0x40
 process_one_work+0x3b6/0x6a0
 worker_thread+0x368/0x520
 kthread+0x165/0x1a0
 ret_from_fork+0x1f/0x30

This reproducer triggers that bug:

while:
do
    rmmod ixgbe
    sleep 0.5
    modprobe ixgbe
    sleep 0.5

When calling fill_kobj_path() to fill path, if the name length of
kobj becomes longer, return failure and retry. This fixes the problem.

Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Signed-off-by: Wang Hai <wanghai38@huawei.com>
Link: https://lore.kernel.org/r/20221220012143.52141-1-wanghai38@huawei.com
Signed-off-by: Oleksandr Tymoshenko <ovt@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-11-08 11:22:17 +01:00
Michael Bestas
dd55724109
Merge tag 'ASB-2023-10-06_4.19-stable' of https://android.googlesource.com/kernel/common into android13-4.19-kona
https://source.android.com/docs/security/bulletin/2023-10-01

* tag 'ASB-2023-10-06_4.19-stable' of https://android.googlesource.com/kernel/common:
  UPSTREAM: net/sched: sch_hfsc: Ensure inner classes have fsc curve
  UPSTREAM: net: sched: sch_qfq: Fix UAF in qfq_dequeue()
  Linux 4.19.295
  net/sched: Retire rsvp classifier
  net/sched: cls_fw: No longer copy tcf_result on update to avoid use-after-free
  mtd: rawnand: brcmnand: Fix ECC level field setting for v7.2 controller
  nfsd: fix change_info in NFSv4 RENAME replies
  btrfs: fix lockdep splat and potential deadlock after failure running delayed items
  attr: block mode changes of symlinks
  md/raid1: fix error: ISO C90 forbids mixed declarations
  kobject: Add sanity check for kset->kobj.ktype in kset_register()
  media: pci: ipu3-cio2: Initialise timing struct to avoid a compiler warning
  serial: cpm_uart: Avoid suspicious locking
  scsi: target: iscsi: Fix buffer overflow in lio_target_nacl_info_show()
  usb: gadget: fsl_qe_udc: validate endpoint index for ch9 udc
  media: pci: cx23885: replace BUG with error return
  media: tuners: qt1010: replace BUG_ON with a regular error
  iio: core: Use min() instead of min_t() to make code more robust
  media: az6007: Fix null-ptr-deref in az6007_i2c_xfer()
  media: anysee: fix null-ptr-deref in anysee_master_xfer
  media: af9005: Fix null-ptr-deref in af9005_i2c_xfer
  media: dw2102: Fix null-ptr-deref in dw2102_i2c_transfer()
  media: dvb-usb-v2: af9035: Fix null-ptr-deref in af9035_i2c_master_xfer
  powerpc/pseries: fix possible memory leak in ibmebus_bus_init()
  jfs: fix invalid free of JFS_IP(ipimap)->i_imap in diUnmount
  fs/jfs: prevent double-free in dbUnmount() after failed jfs_remount()
  ext2: fix datatype of block number in ext2_xattr_set2()
  md: raid1: fix potential OOB in raid1_remove_disk()
  drm/exynos: fix a possible null-pointer dereference due to data race in exynos_drm_crtc_atomic_disable()
  alx: fix OOB-read compiler warning
  tpm_tis: Resend command to recover from data transfer errors
  crypto: lib/mpi - avoid null pointer deref in mpi_cmp_ui()
  wifi: mwifiex: fix fortify warning
  wifi: ath9k: fix printk specifier
  hw_breakpoint: fix single-stepping when using bpf_overflow_handler
  ACPI: video: Add backlight=native DMI quirk for Lenovo Ideapad Z470
  ACPICA: Add AML_NO_OPERAND_RESOLVE flag to Timer
  btrfs: output extra debug info if we failed to find an inline backref
  autofs: fix memory leak of waitqueues in autofs_catatonic_mode
  parisc: Drop loops_per_jiffy from per_cpu struct
  drm/amd/display: Fix a bug when searching for insert_above_mpcc
  kcm: Fix error handling for SOCK_DGRAM in kcm_sendmsg().
  ixgbe: fix timestamp configuration code
  kcm: Fix memory leak in error path of kcm_sendmsg()
  net: ethernet: mtk_eth_soc: fix possible NULL pointer dereference in mtk_hwlro_get_fdir_all()
  perf hists browser: Fix hierarchy mode header
  mtd: rawnand: brcmnand: Fix potential false time out warning
  mtd: rawnand: brcmnand: Fix potential out-of-bounds access in oob write
  mtd: rawnand: brcmnand: Fix crash during the panic_write
  btrfs: don't start transaction when joining with TRANS_JOIN_NOSTART
  ata: pata_ftide010: Add missing MODULE_DESCRIPTION
  ata: sata_gemini: Add missing MODULE_DESCRIPTION
  netfilter: nfnetlink_osf: avoid OOB read
  idr: fix param name in idr_alloc_cyclic() doc
  igb: Change IGB_MIN to allow set rx/tx value between 64 and 80
  igbvf: Change IGBVF_MIN to allow set rx/tx value between 64 and 80
  kcm: Destroy mutex in kcm_exit_net()
  net: sched: sch_qfq: Fix UAF in qfq_dequeue()
  af_unix: Fix data race around sk->sk_err.
  af_unix: Fix data-races around sk->sk_shutdown.
  af_unix: Fix data-race around unix_tot_inflight.
  af_unix: Fix data-races around user->unix_inflight.
  net: ipv6/addrconf: avoid integer underflow in ipv6_create_tempaddr
  veth: Fixing transmit return status for dropped packets
  igb: disable virtualization features on 82580
  net: read sk->sk_family once in sk_mc_loop()
  pwm: lpc32xx: Remove handling of PWM channels
  watchdog: intel-mid_wdt: add MODULE_ALIAS() to allow auto-load
  x86/virt: Drop unnecessary check on extended CPUID level in cpu_has_svm()
  kconfig: fix possible buffer overflow
  NFSv4/pnfs: minor fix for cleanup path in nfs4_get_device_info
  soc: qcom: qmi_encdec: Restrict string length in decode
  clk: qcom: gcc-mdm9615: use proper parent for pll0_vote clock
  parisc: led: Reduce CPU overhead for disk & lan LED computation
  parisc: led: Fix LAN receive and transmit LEDs
  drm/ast: Fix DRAM init on AST2200
  fbdev/ep93xx-fb: Do not assign to struct fb_info.dev
  scsi: qla2xxx: Turn off noisy message log
  scsi: qla2xxx: fix inconsistent TMF timeout
  udf: initialize newblock to 0
  usb: typec: tcpci: clear the fault status bit
  serial: sc16is7xx: fix broken port 0 uart init
  sc16is7xx: Set iobase to device index
  PCI/ATS: Add inline to pci_prg_resp_pasid_required()
  pstore/ram: Check start of empty przs during init
  net: handle ARPHRD_PPP in dev_is_mac_header_xmit()
  X.509: if signature is unsupported skip validation
  cpufreq: brcmstb-avs-cpufreq: Fix -Warray-bounds bug
  crypto: stm32 - fix loop iterating through scatterlist for DMA
  dccp: Fix out of bounds access in DCCP error handler
  dlm: fix plock lookup when using multiple lockspaces
  parisc: Fix /proc/cpuinfo output for lscpu
  procfs: block chmod on /proc/thread-self/comm
  Revert "PCI: Mark NVIDIA T4 GPUs to avoid bus reset"
  ntb: Fix calculation ntb_transport_tx_free_entry()
  ntb: Clean up tx tail index on link down
  ntb: Drop packets when qp link is down
  media: dvb: symbol fixup for dvb_attach()
  backlight/lv5207lp: Compare against struct fb_info.device
  backlight/bd6107: Compare against struct fb_info.device
  backlight/gpio_backlight: Compare against struct fb_info.device
  ARM: OMAP2+: Fix -Warray-bounds warning in _pwrdm_state_switch()
  ipmi_si: fix a memleak in try_smi_init()
  ALSA: pcm: Fix missing fixup call in compat hw_refine ioctl
  PM / devfreq: Fix leak in devfreq_dev_release()
  igb: set max size RX buffer when store bad packet is enabled
  skbuff: skb_segment, Call zero copy functions before using skbuff frags
  netfilter: xt_sctp: validate the flag_info count
  netfilter: xt_u32: validate user space input
  netfilter: ipset: add the missing IP_SET_HASH_WITH_NET0 macro for ip_set_hash_netportnet.c
  igmp: limit igmpv3_newpack() packet size to IP_MAX_MTU
  dmaengine: ste_dma40: Add missing IRQ check in d40_probe
  um: Fix hostaudio build errors
  arch: um: drivers: Kconfig: pedantic formatting
  rpmsg: glink: Add check for kstrdup
  HID: multitouch: Correct devm device reference for hidinput input_dev name
  Revert "IB/isert: Fix incorrect release of isert connection"
  amba: bus: fix refcount leak
  serial: tegra: handle clk prepare error in tegra_uart_hw_init()
  scsi: fcoe: Fix potential deadlock on &fip->ctlr_lock
  scsi: core: Use 32-bit hostnum in scsi_host_lookup()
  cgroup:namespace: Remove unused cgroup_namespaces_init()
  media: ov2680: Fix regulators being left enabled on ov2680_power_on() errors
  media: ov2680: Fix vflip / hflip set functions
  media: ov2680: Fix ov2680_bayer_order()
  media: ov2680: Remove auto-gain and auto-exposure controls
  media: i2c: ov2680: Set V4L2_CTRL_FLAG_MODIFY_LAYOUT on flips
  USB: gadget: f_mass_storage: Fix unused variable warning
  media: go7007: Remove redundant if statement
  IB/uverbs: Fix an potential error pointer dereference
  dma-buf/sync_file: Fix docs syntax
  scsi: qedf: Do not touch __user pointer in qedf_dbg_fp_int_cmd_read() directly
  scsi: qedf: Do not touch __user pointer in qedf_dbg_stop_io_on_error_cmd_read() directly
  x86/APM: drop the duplicate APM_MINOR_DEV macro
  scsi: qla4xxx: Add length check when parsing nlattrs
  scsi: be2iscsi: Add length check when parsing nlattrs
  scsi: iscsi: Add strlen() check in iscsi_if_set{_host}_param()
  usb: phy: mxs: fix getting wrong state with mxs_phy_is_otg_host()
  media: mediatek: vcodec: Return NULL if no vdec_fb is found
  media: cx24120: Add retval check for cx24120_message_send()
  media: dvb-usb: m920x: Fix a potential memory leak in m920x_i2c_xfer()
  media: dib7000p: Fix potential division by zero
  drivers: usb: smsusb: fix error handling code in smsusb_init_device
  media: v4l2-core: Fix a potential resource leak in v4l2_fwnode_parse_link()
  media: v4l2-fwnode: simplify v4l2_fwnode_parse_link
  media: v4l2-fwnode: fix v4l2_fwnode_parse_link handling
  media: Use of_node_name_eq for node name comparisons
  NFSD: da_addr_body field missing in some GETDEVICEINFO replies
  fs: lockd: avoid possible wrong NULL parameter
  jfs: validate max amount of blocks before allocation.
  powerpc/iommu: Fix notifiers being shared by PCI and VIO buses
  nfs/blocklayout: Use the passed in gfp flags
  wifi: ath10k: Use RMW accessors for changing LNKCTL
  drm/radeon: Use RMW accessors for changing LNKCTL
  drm/radeon: Prefer pcie_capability_read_word()
  drm/radeon: Replace numbers with PCI_EXP_LNKCTL2 definitions
  drm/radeon: Correct Transmit Margin masks
  drm/amdgpu: Use RMW accessors for changing LNKCTL
  drm/amdgpu: Prefer pcie_capability_read_word()
  drm/amdgpu: Replace numbers with PCI_EXP_LNKCTL2 definitions
  drm/amdgpu: Correct Transmit Margin masks
  PCI: Add #defines for Enter Compliance, Transmit Margin
  PCI: Decode PCIe 32 GT/s link speed
  PCI: Cleanup register definition width and whitespace
  PCI/ATS: Add pci_prg_resp_pasid_required() interface.
  PCI/ASPM: Use RMW accessors for changing LNKCTL
  PCI: pciehp: Use RMW accessors for changing LNKCTL
  PCI: Mark NVIDIA T4 GPUs to avoid bus reset
  clk: sunxi-ng: Modify mismatched function name
  drivers: clk: keystone: Fix parameter judgment in _of_pll_clk_init()
  ALSA: ac97: Fix possible error value of *rac97
  of: unittest: Fix overlay type in apply/revert check
  audit: fix possible soft lockup in __audit_inode_child()
  smackfs: Prevent underflow in smk_set_cipso()
  drm/msm/mdp5: Don't leak some plane state
  drm/msm: Replace drm_framebuffer_{un/reference} with put, get functions
  of: unittest: fix null pointer dereferencing in of_unittest_find_node_by_name()
  drm/tegra: dpaux: Fix incorrect return value of platform_get_irq
  drm/tegra: Remove superfluous error messages around platform_get_irq()
  ARM: dts: BCM53573: Fix Ethernet info for Luxul devices
  drm: adv7511: Fix low refresh rate register for ADV7533/5
  ARM: dts: samsung: s5pv210-smdkv210: correct ethernet reg addresses (split)
  ARM: dts: s5pv210: add dummy 5V regulator for backlight on SMDKv210
  ARM: dts: s5pv210: correct ethernet unit address in SMDKV210
  ARM: dts: s5pv210: use defines for IRQ flags in SMDKV210
  ARM: dts: s5pv210: add RTC 32 KHz clock in SMDKV210
  ARM: dts: samsung: s3c6410-mini6410: correct ethernet reg addresses (split)
  ARM: dts: s3c64xx: align pinctrl with dtschema
  ARM: dts: s3c6410: align node SROM bus node name with dtschema in Mini6410
  ARM: dts: s3c6410: move fixed clocks under root node in Mini6410
  ARM: dts: BCM53573: Use updated "spi-gpio" binding properties
  ARM: dts: BCM53573: Add cells sizes to PCIe node
  ARM: dts: BCM53573: Drop nonexistent #usb-cells
  ARM: dts: BCM53573: Describe on-SoC BCM53125 rev 4 switch
  ARM: dts: BCM5301X: Harmonize EHCI/OHCI DT nodes name
  drm/amdgpu: avoid integer overflow warning in amdgpu_device_resize_fb_bar()
  arm64: dts: qcom: msm8996: Add missing interrupt to the USB2 controller
  arm64: dts: msm8996: thermal: Add interrupt support
  quota: fix dqput() to follow the guarantees dquot_srcu should provide
  quota: add new helper dquot_active()
  quota: rename dquot_active() to inode_quota_active()
  quota: factor out dquot_write_dquot()
  quota: avoid increasing DQST_LOOKUPS when iterating over dirty/inuse list
  quota: add dqi_dirty_list description to comment of Dquot List Management
  netrom: Deny concurrent connect().
  net/sched: sch_hfsc: Ensure inner classes have fsc curve
  net: arcnet: Do not call kfree_skb() under local_irq_disable()
  wifi: ath9k: use IS_ERR() with debugfs_create_dir()
  wifi: mwifiex: avoid possible NULL skb pointer dereference
  wifi: ath9k: protect WMI command response buffer replacement with a lock
  wifi: ath9k: fix races between ath9k_wmi_cmd and ath9k_wmi_ctrl_rx
  wifi: mwifiex: Fix missed return in oob checks failed path
  wifi: mwifiex: fix memory leak in mwifiex_histogram_read()
  fs: ocfs2: namei: check return value of ocfs2_add_entry()
  lwt: Check LWTUNNEL_XMIT_CONTINUE strictly
  crypto: caam - fix unchecked return value error
  Bluetooth: nokia: fix value check in nokia_bluetooth_serdev_probe()
  wifi: mwifiex: fix error recovery in PCIE buffer descriptor management
  mwifiex: switch from 'pci_' to 'dma_' API
  mwifiex: drop 'set_consistent_dma_mask' log message
  wifi: mwifiex: Fix OOB and integer underflow when rx packets
  can: gs_usb: gs_usb_receive_bulk_callback(): count RX overflow errors also in case of OOM
  spi: tegra20-sflash: fix to check return value of platform_get_irq() in tegra_sflash_probe()
  regmap: rbtree: Use alloc_flags for memory allocations
  tcp: tcp_enter_quickack_mode() should be static
  bpf: Clear the probe_addr for uprobe
  cpufreq: powernow-k8: Use related_cpus instead of cpus in driver.exit()
  fs: Fix error checking for d_hash_and_lookup()
  netfilter: nf_tables: missing NFT_TRANS_PREPARE_ERROR in flowtable deactivatation
  netfilter: nft_flow_offload: fix underflow in flowtable reference counter
  new helper: lookup_positive_unlocked()
  eventfd: prevent underflow for eventfd semaphores
  eventfd: Export eventfd_ctx_do_read()
  reiserfs: Check the return value from __getblk()
  Revert "net: macsec: preserve ingress frame ordering"
  udf: Handle error when adding extent to a file
  udf: Check consistency of Space Bitmap Descriptor
  powerpc/32s: Fix assembler warning about r0
  powerpc/32: Include .branch_lt in data section
  net: Avoid address overwrite in kernel_connect
  ALSA: seq: oss: Fix racy open/close of MIDI devices
  cifs: add a warning when the in-flight count goes negative
  sctp: handle invalid error codes without calling BUG()
  bnx2x: fix page fault following EEH recovery
  netlabel: fix shift wrapping bug in netlbl_catmap_setlong()
  scsi: qedi: Fix potential deadlock on &qedi_percpu->p_work_lock
  idmaengine: make FSL_EDMA and INTEL_IDMA64 depends on HAS_IOMEM
  net: usb: qmi_wwan: add Quectel EM05GV2
  security: keys: perform capable check only on privileged operations
  platform/x86: intel: hid: Always call BTNL ACPI method
  ASoC: atmel: Fix the 8K sample parameter in I2SC master
  ASoc: codecs: ES8316: Fix DMIC config
  fs/nls: make load_nls() take a const parameter
  s390/dasd: fix hanging device after request requeue
  s390/dasd: use correct number of retries for ERP requests
  m68k: Fix invalid .section syntax
  vxlan: generalize vxlan_parse_gpe_hdr and remove unused args
  ethernet: atheros: fix return value check in atl1c_tso_csum()
  ASoC: da7219: Check for failure reading AAD IRQ events
  ASoC: da7219: Flush pending AAD IRQ when suspending
  9p: virtio: make sure 'offs' is initialized in zc_request
  pinctrl: amd: Don't show `Invalid config param` errors
  nilfs2: fix WARNING in mark_buffer_dirty due to discarded buffer reuse
  nilfs2: fix general protection fault in nilfs_lookup_dirty_data_buffers()
  fsi: master-ast-cf: Add MODULE_FIRMWARE macro
  serial: sc16is7xx: fix bug when first setting GPIO direction
  Bluetooth: btsdio: fix use after free bug in btsdio_remove due to race condition
  HID: wacom: remove the battery when the EKR is off
  USB: serial: option: add FOXCONN T99W368/T99W373 product
  USB: serial: option: add Quectel EM05G variant (0x030e)
  modules: only allow symbol_get of EXPORT_SYMBOL_GPL modules
  rtc: ds1685: use EXPORT_SYMBOL_GPL for ds1685_rtc_poweroff
  mmc: au1xmmc: force non-modular build and remove symbol_get usage
  ARM: pxa: remove use of symbol_get()
  erofs: ensure that the post-EOF tails are all zeroed

 Conflicts:
	include/net/tcp.h

Change-Id: Ia73d7be3d6cae8d4fd38da7c6d85a977840872d3
2023-10-16 15:01:41 +03:00
Greg Kroah-Hartman
501b721387 This is the 4.19.295 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmUOpmEACgkQONu9yGCS
 aT6vSQ/8D3yjJUYiUnHkiSzTMZHAtwR5qk0jCsqw1Xlr+XVouGCG/wpk8z7ckT6W
 4gsG5+QvuB4SfWXmbIn/rPApqQdQSiTicOfHrev705v0U+ib+kw1vgBKv38qkOlI
 EZKuo7Ir1vZUnqghw9uIGperU3kEAt2EvWK37EBryukDoxbzDGIctOvAN7KMMbAJ
 jPQciVOOAJrNNdgPOSrxs1OCdAkEYlDaNuBZ+9j/HjNQLB9KtdtsJ50gerCPA4rS
 oKpZhnx9VJYXI9szor3T7q71iNfpJeL+mOrnpCSFVAFCPkesXQ+MG/GdgJJQDCMJ
 9VF12W6rpqVcKfYFdPX9WevkqMfHRpE4brotDQx36rpUwVFcP7HClJ2zE3p36QWV
 Mfu4O31ZNkLUF8SmFXc3JXVyrwe/ARiha9nLH9VKZ7cSHoYUKlO4NeSGyHjz5J99
 RErBGpea7SgHTSLk30+sHaB3zhdUZyv8ej++zjTG9QA8bRbMp97I9psQ7FWhWDng
 l6f87mdta1X76OJJPkL3yZfbiB/M58e514ptbDNhu4cnH/S6aB6I3K5IYVtfZI/9
 zESuavKEUks+Ng1vBUGsPGN/eHDaPWUkl7HewP7WXRDOQUjaIX/0saeaSiUFYNI7
 UYa72hD9fKMblkwxIl75ybI/WZRgw9fyrQeGG0DfX3t6kt6BhHM=
 =bQT4
 -----END PGP SIGNATURE-----

Merge 4.19.295 into android-4.19-stable

Changes in 4.19.295
	erofs: ensure that the post-EOF tails are all zeroed
	ARM: pxa: remove use of symbol_get()
	mmc: au1xmmc: force non-modular build and remove symbol_get usage
	rtc: ds1685: use EXPORT_SYMBOL_GPL for ds1685_rtc_poweroff
	modules: only allow symbol_get of EXPORT_SYMBOL_GPL modules
	USB: serial: option: add Quectel EM05G variant (0x030e)
	USB: serial: option: add FOXCONN T99W368/T99W373 product
	HID: wacom: remove the battery when the EKR is off
	Bluetooth: btsdio: fix use after free bug in btsdio_remove due to race condition
	serial: sc16is7xx: fix bug when first setting GPIO direction
	fsi: master-ast-cf: Add MODULE_FIRMWARE macro
	nilfs2: fix general protection fault in nilfs_lookup_dirty_data_buffers()
	nilfs2: fix WARNING in mark_buffer_dirty due to discarded buffer reuse
	pinctrl: amd: Don't show `Invalid config param` errors
	9p: virtio: make sure 'offs' is initialized in zc_request
	ASoC: da7219: Flush pending AAD IRQ when suspending
	ASoC: da7219: Check for failure reading AAD IRQ events
	ethernet: atheros: fix return value check in atl1c_tso_csum()
	vxlan: generalize vxlan_parse_gpe_hdr and remove unused args
	m68k: Fix invalid .section syntax
	s390/dasd: use correct number of retries for ERP requests
	s390/dasd: fix hanging device after request requeue
	fs/nls: make load_nls() take a const parameter
	ASoc: codecs: ES8316: Fix DMIC config
	ASoC: atmel: Fix the 8K sample parameter in I2SC master
	platform/x86: intel: hid: Always call BTNL ACPI method
	security: keys: perform capable check only on privileged operations
	net: usb: qmi_wwan: add Quectel EM05GV2
	idmaengine: make FSL_EDMA and INTEL_IDMA64 depends on HAS_IOMEM
	scsi: qedi: Fix potential deadlock on &qedi_percpu->p_work_lock
	netlabel: fix shift wrapping bug in netlbl_catmap_setlong()
	bnx2x: fix page fault following EEH recovery
	sctp: handle invalid error codes without calling BUG()
	cifs: add a warning when the in-flight count goes negative
	ALSA: seq: oss: Fix racy open/close of MIDI devices
	net: Avoid address overwrite in kernel_connect
	powerpc/32: Include .branch_lt in data section
	powerpc/32s: Fix assembler warning about r0
	udf: Check consistency of Space Bitmap Descriptor
	udf: Handle error when adding extent to a file
	Revert "net: macsec: preserve ingress frame ordering"
	reiserfs: Check the return value from __getblk()
	eventfd: Export eventfd_ctx_do_read()
	eventfd: prevent underflow for eventfd semaphores
	new helper: lookup_positive_unlocked()
	netfilter: nft_flow_offload: fix underflow in flowtable reference counter
	netfilter: nf_tables: missing NFT_TRANS_PREPARE_ERROR in flowtable deactivatation
	fs: Fix error checking for d_hash_and_lookup()
	cpufreq: powernow-k8: Use related_cpus instead of cpus in driver.exit()
	bpf: Clear the probe_addr for uprobe
	tcp: tcp_enter_quickack_mode() should be static
	regmap: rbtree: Use alloc_flags for memory allocations
	spi: tegra20-sflash: fix to check return value of platform_get_irq() in tegra_sflash_probe()
	can: gs_usb: gs_usb_receive_bulk_callback(): count RX overflow errors also in case of OOM
	wifi: mwifiex: Fix OOB and integer underflow when rx packets
	mwifiex: drop 'set_consistent_dma_mask' log message
	mwifiex: switch from 'pci_' to 'dma_' API
	wifi: mwifiex: fix error recovery in PCIE buffer descriptor management
	Bluetooth: nokia: fix value check in nokia_bluetooth_serdev_probe()
	crypto: caam - fix unchecked return value error
	lwt: Check LWTUNNEL_XMIT_CONTINUE strictly
	fs: ocfs2: namei: check return value of ocfs2_add_entry()
	wifi: mwifiex: fix memory leak in mwifiex_histogram_read()
	wifi: mwifiex: Fix missed return in oob checks failed path
	wifi: ath9k: fix races between ath9k_wmi_cmd and ath9k_wmi_ctrl_rx
	wifi: ath9k: protect WMI command response buffer replacement with a lock
	wifi: mwifiex: avoid possible NULL skb pointer dereference
	wifi: ath9k: use IS_ERR() with debugfs_create_dir()
	net: arcnet: Do not call kfree_skb() under local_irq_disable()
	net/sched: sch_hfsc: Ensure inner classes have fsc curve
	netrom: Deny concurrent connect().
	quota: add dqi_dirty_list description to comment of Dquot List Management
	quota: avoid increasing DQST_LOOKUPS when iterating over dirty/inuse list
	quota: factor out dquot_write_dquot()
	quota: rename dquot_active() to inode_quota_active()
	quota: add new helper dquot_active()
	quota: fix dqput() to follow the guarantees dquot_srcu should provide
	arm64: dts: msm8996: thermal: Add interrupt support
	arm64: dts: qcom: msm8996: Add missing interrupt to the USB2 controller
	drm/amdgpu: avoid integer overflow warning in amdgpu_device_resize_fb_bar()
	ARM: dts: BCM5301X: Harmonize EHCI/OHCI DT nodes name
	ARM: dts: BCM53573: Describe on-SoC BCM53125 rev 4 switch
	ARM: dts: BCM53573: Drop nonexistent #usb-cells
	ARM: dts: BCM53573: Add cells sizes to PCIe node
	ARM: dts: BCM53573: Use updated "spi-gpio" binding properties
	ARM: dts: s3c6410: move fixed clocks under root node in Mini6410
	ARM: dts: s3c6410: align node SROM bus node name with dtschema in Mini6410
	ARM: dts: s3c64xx: align pinctrl with dtschema
	ARM: dts: samsung: s3c6410-mini6410: correct ethernet reg addresses (split)
	ARM: dts: s5pv210: add RTC 32 KHz clock in SMDKV210
	ARM: dts: s5pv210: use defines for IRQ flags in SMDKV210
	ARM: dts: s5pv210: correct ethernet unit address in SMDKV210
	ARM: dts: s5pv210: add dummy 5V regulator for backlight on SMDKv210
	ARM: dts: samsung: s5pv210-smdkv210: correct ethernet reg addresses (split)
	drm: adv7511: Fix low refresh rate register for ADV7533/5
	ARM: dts: BCM53573: Fix Ethernet info for Luxul devices
	drm/tegra: Remove superfluous error messages around platform_get_irq()
	drm/tegra: dpaux: Fix incorrect return value of platform_get_irq
	of: unittest: fix null pointer dereferencing in of_unittest_find_node_by_name()
	drm/msm: Replace drm_framebuffer_{un/reference} with put, get functions
	drm/msm/mdp5: Don't leak some plane state
	smackfs: Prevent underflow in smk_set_cipso()
	audit: fix possible soft lockup in __audit_inode_child()
	of: unittest: Fix overlay type in apply/revert check
	ALSA: ac97: Fix possible error value of *rac97
	drivers: clk: keystone: Fix parameter judgment in _of_pll_clk_init()
	clk: sunxi-ng: Modify mismatched function name
	PCI: Mark NVIDIA T4 GPUs to avoid bus reset
	PCI: pciehp: Use RMW accessors for changing LNKCTL
	PCI/ASPM: Use RMW accessors for changing LNKCTL
	PCI/ATS: Add pci_prg_resp_pasid_required() interface.
	PCI: Cleanup register definition width and whitespace
	PCI: Decode PCIe 32 GT/s link speed
	PCI: Add #defines for Enter Compliance, Transmit Margin
	drm/amdgpu: Correct Transmit Margin masks
	drm/amdgpu: Replace numbers with PCI_EXP_LNKCTL2 definitions
	drm/amdgpu: Prefer pcie_capability_read_word()
	drm/amdgpu: Use RMW accessors for changing LNKCTL
	drm/radeon: Correct Transmit Margin masks
	drm/radeon: Replace numbers with PCI_EXP_LNKCTL2 definitions
	drm/radeon: Prefer pcie_capability_read_word()
	drm/radeon: Use RMW accessors for changing LNKCTL
	wifi: ath10k: Use RMW accessors for changing LNKCTL
	nfs/blocklayout: Use the passed in gfp flags
	powerpc/iommu: Fix notifiers being shared by PCI and VIO buses
	jfs: validate max amount of blocks before allocation.
	fs: lockd: avoid possible wrong NULL parameter
	NFSD: da_addr_body field missing in some GETDEVICEINFO replies
	media: Use of_node_name_eq for node name comparisons
	media: v4l2-fwnode: fix v4l2_fwnode_parse_link handling
	media: v4l2-fwnode: simplify v4l2_fwnode_parse_link
	media: v4l2-core: Fix a potential resource leak in v4l2_fwnode_parse_link()
	drivers: usb: smsusb: fix error handling code in smsusb_init_device
	media: dib7000p: Fix potential division by zero
	media: dvb-usb: m920x: Fix a potential memory leak in m920x_i2c_xfer()
	media: cx24120: Add retval check for cx24120_message_send()
	media: mediatek: vcodec: Return NULL if no vdec_fb is found
	usb: phy: mxs: fix getting wrong state with mxs_phy_is_otg_host()
	scsi: iscsi: Add strlen() check in iscsi_if_set{_host}_param()
	scsi: be2iscsi: Add length check when parsing nlattrs
	scsi: qla4xxx: Add length check when parsing nlattrs
	x86/APM: drop the duplicate APM_MINOR_DEV macro
	scsi: qedf: Do not touch __user pointer in qedf_dbg_stop_io_on_error_cmd_read() directly
	scsi: qedf: Do not touch __user pointer in qedf_dbg_fp_int_cmd_read() directly
	dma-buf/sync_file: Fix docs syntax
	IB/uverbs: Fix an potential error pointer dereference
	media: go7007: Remove redundant if statement
	USB: gadget: f_mass_storage: Fix unused variable warning
	media: i2c: ov2680: Set V4L2_CTRL_FLAG_MODIFY_LAYOUT on flips
	media: ov2680: Remove auto-gain and auto-exposure controls
	media: ov2680: Fix ov2680_bayer_order()
	media: ov2680: Fix vflip / hflip set functions
	media: ov2680: Fix regulators being left enabled on ov2680_power_on() errors
	cgroup:namespace: Remove unused cgroup_namespaces_init()
	scsi: core: Use 32-bit hostnum in scsi_host_lookup()
	scsi: fcoe: Fix potential deadlock on &fip->ctlr_lock
	serial: tegra: handle clk prepare error in tegra_uart_hw_init()
	amba: bus: fix refcount leak
	Revert "IB/isert: Fix incorrect release of isert connection"
	HID: multitouch: Correct devm device reference for hidinput input_dev name
	rpmsg: glink: Add check for kstrdup
	arch: um: drivers: Kconfig: pedantic formatting
	um: Fix hostaudio build errors
	dmaengine: ste_dma40: Add missing IRQ check in d40_probe
	igmp: limit igmpv3_newpack() packet size to IP_MAX_MTU
	netfilter: ipset: add the missing IP_SET_HASH_WITH_NET0 macro for ip_set_hash_netportnet.c
	netfilter: xt_u32: validate user space input
	netfilter: xt_sctp: validate the flag_info count
	skbuff: skb_segment, Call zero copy functions before using skbuff frags
	igb: set max size RX buffer when store bad packet is enabled
	PM / devfreq: Fix leak in devfreq_dev_release()
	ALSA: pcm: Fix missing fixup call in compat hw_refine ioctl
	ipmi_si: fix a memleak in try_smi_init()
	ARM: OMAP2+: Fix -Warray-bounds warning in _pwrdm_state_switch()
	backlight/gpio_backlight: Compare against struct fb_info.device
	backlight/bd6107: Compare against struct fb_info.device
	backlight/lv5207lp: Compare against struct fb_info.device
	media: dvb: symbol fixup for dvb_attach()
	ntb: Drop packets when qp link is down
	ntb: Clean up tx tail index on link down
	ntb: Fix calculation ntb_transport_tx_free_entry()
	Revert "PCI: Mark NVIDIA T4 GPUs to avoid bus reset"
	procfs: block chmod on /proc/thread-self/comm
	parisc: Fix /proc/cpuinfo output for lscpu
	dlm: fix plock lookup when using multiple lockspaces
	dccp: Fix out of bounds access in DCCP error handler
	crypto: stm32 - fix loop iterating through scatterlist for DMA
	cpufreq: brcmstb-avs-cpufreq: Fix -Warray-bounds bug
	X.509: if signature is unsupported skip validation
	net: handle ARPHRD_PPP in dev_is_mac_header_xmit()
	pstore/ram: Check start of empty przs during init
	PCI/ATS: Add inline to pci_prg_resp_pasid_required()
	sc16is7xx: Set iobase to device index
	serial: sc16is7xx: fix broken port 0 uart init
	usb: typec: tcpci: clear the fault status bit
	udf: initialize newblock to 0
	scsi: qla2xxx: fix inconsistent TMF timeout
	scsi: qla2xxx: Turn off noisy message log
	fbdev/ep93xx-fb: Do not assign to struct fb_info.dev
	drm/ast: Fix DRAM init on AST2200
	parisc: led: Fix LAN receive and transmit LEDs
	parisc: led: Reduce CPU overhead for disk & lan LED computation
	clk: qcom: gcc-mdm9615: use proper parent for pll0_vote clock
	soc: qcom: qmi_encdec: Restrict string length in decode
	NFSv4/pnfs: minor fix for cleanup path in nfs4_get_device_info
	kconfig: fix possible buffer overflow
	x86/virt: Drop unnecessary check on extended CPUID level in cpu_has_svm()
	watchdog: intel-mid_wdt: add MODULE_ALIAS() to allow auto-load
	pwm: lpc32xx: Remove handling of PWM channels
	net: read sk->sk_family once in sk_mc_loop()
	igb: disable virtualization features on 82580
	veth: Fixing transmit return status for dropped packets
	net: ipv6/addrconf: avoid integer underflow in ipv6_create_tempaddr
	af_unix: Fix data-races around user->unix_inflight.
	af_unix: Fix data-race around unix_tot_inflight.
	af_unix: Fix data-races around sk->sk_shutdown.
	af_unix: Fix data race around sk->sk_err.
	net: sched: sch_qfq: Fix UAF in qfq_dequeue()
	kcm: Destroy mutex in kcm_exit_net()
	igbvf: Change IGBVF_MIN to allow set rx/tx value between 64 and 80
	igb: Change IGB_MIN to allow set rx/tx value between 64 and 80
	idr: fix param name in idr_alloc_cyclic() doc
	netfilter: nfnetlink_osf: avoid OOB read
	ata: sata_gemini: Add missing MODULE_DESCRIPTION
	ata: pata_ftide010: Add missing MODULE_DESCRIPTION
	btrfs: don't start transaction when joining with TRANS_JOIN_NOSTART
	mtd: rawnand: brcmnand: Fix crash during the panic_write
	mtd: rawnand: brcmnand: Fix potential out-of-bounds access in oob write
	mtd: rawnand: brcmnand: Fix potential false time out warning
	perf hists browser: Fix hierarchy mode header
	net: ethernet: mtk_eth_soc: fix possible NULL pointer dereference in mtk_hwlro_get_fdir_all()
	kcm: Fix memory leak in error path of kcm_sendmsg()
	ixgbe: fix timestamp configuration code
	kcm: Fix error handling for SOCK_DGRAM in kcm_sendmsg().
	drm/amd/display: Fix a bug when searching for insert_above_mpcc
	parisc: Drop loops_per_jiffy from per_cpu struct
	autofs: fix memory leak of waitqueues in autofs_catatonic_mode
	btrfs: output extra debug info if we failed to find an inline backref
	ACPICA: Add AML_NO_OPERAND_RESOLVE flag to Timer
	ACPI: video: Add backlight=native DMI quirk for Lenovo Ideapad Z470
	hw_breakpoint: fix single-stepping when using bpf_overflow_handler
	wifi: ath9k: fix printk specifier
	wifi: mwifiex: fix fortify warning
	crypto: lib/mpi - avoid null pointer deref in mpi_cmp_ui()
	tpm_tis: Resend command to recover from data transfer errors
	alx: fix OOB-read compiler warning
	drm/exynos: fix a possible null-pointer dereference due to data race in exynos_drm_crtc_atomic_disable()
	md: raid1: fix potential OOB in raid1_remove_disk()
	ext2: fix datatype of block number in ext2_xattr_set2()
	fs/jfs: prevent double-free in dbUnmount() after failed jfs_remount()
	jfs: fix invalid free of JFS_IP(ipimap)->i_imap in diUnmount
	powerpc/pseries: fix possible memory leak in ibmebus_bus_init()
	media: dvb-usb-v2: af9035: Fix null-ptr-deref in af9035_i2c_master_xfer
	media: dw2102: Fix null-ptr-deref in dw2102_i2c_transfer()
	media: af9005: Fix null-ptr-deref in af9005_i2c_xfer
	media: anysee: fix null-ptr-deref in anysee_master_xfer
	media: az6007: Fix null-ptr-deref in az6007_i2c_xfer()
	iio: core: Use min() instead of min_t() to make code more robust
	media: tuners: qt1010: replace BUG_ON with a regular error
	media: pci: cx23885: replace BUG with error return
	usb: gadget: fsl_qe_udc: validate endpoint index for ch9 udc
	scsi: target: iscsi: Fix buffer overflow in lio_target_nacl_info_show()
	serial: cpm_uart: Avoid suspicious locking
	media: pci: ipu3-cio2: Initialise timing struct to avoid a compiler warning
	kobject: Add sanity check for kset->kobj.ktype in kset_register()
	md/raid1: fix error: ISO C90 forbids mixed declarations
	attr: block mode changes of symlinks
	btrfs: fix lockdep splat and potential deadlock after failure running delayed items
	nfsd: fix change_info in NFSv4 RENAME replies
	mtd: rawnand: brcmnand: Fix ECC level field setting for v7.2 controller
	net/sched: cls_fw: No longer copy tcf_result on update to avoid use-after-free
	net/sched: Retire rsvp classifier
	Linux 4.19.295

Change-Id: I5de88dc1e8cebe5736df3023205233cb40c4aa35
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-09-30 11:47:07 +00:00
Zhen Lei
039ec9db2d kobject: Add sanity check for kset->kobj.ktype in kset_register()
[ Upstream commit 4d0fe8c52bb3029d83e323c961221156ab98680b ]

When I register a kset in the following way:
	static struct kset my_kset;
	kobject_set_name(&my_kset.kobj, "my_kset");
        ret = kset_register(&my_kset);

A null pointer dereference exception is occurred:
[ 4453.568337] Unable to handle kernel NULL pointer dereference at \
virtual address 0000000000000028
... ...
[ 4453.810361] Call trace:
[ 4453.813062]  kobject_get_ownership+0xc/0x34
[ 4453.817493]  kobject_add_internal+0x98/0x274
[ 4453.822005]  kset_register+0x5c/0xb4
[ 4453.825820]  my_kobj_init+0x44/0x1000 [my_kset]
... ...

Because I didn't initialize my_kset.kobj.ktype.

According to the description in Documentation/core-api/kobject.rst:
 - A ktype is the type of object that embeds a kobject.  Every structure
   that embeds a kobject needs a corresponding ktype.

So add sanity check to make sure kset->kobj.ktype is not NULL.

Signed-off-by: Zhen Lei <thunder.leizhen@huawei.com>
Link: https://lore.kernel.org/r/20230805084114.1298-2-thunder.leizhen@huaweicloud.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-09-23 10:48:17 +02:00
Mark O'Donovan
ae63e84ffd crypto: lib/mpi - avoid null pointer deref in mpi_cmp_ui()
[ Upstream commit 9e47a758b70167c9301d2b44d2569f86c7796f2d ]

During NVMeTCP Authentication a controller can trigger a kernel
oops by specifying the 8192 bit Diffie Hellman group and passing
a correctly sized, but zeroed Diffie Hellamn value.
mpi_cmp_ui() was detecting this if the second parameter was 0,
but 1 is passed from dh_is_pubkey_valid(). This causes the null
pointer u->d to be dereferenced towards the end of mpi_cmp_ui()

Signed-off-by: Mark O'Donovan <shiftee@posteo.net>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-09-23 10:48:15 +02:00
Ariel Marcovitch
5c6e0a8d64 idr: fix param name in idr_alloc_cyclic() doc
[ Upstream commit 2a15de80dd0f7e04a823291aa9eb49c5294f56af ]

The relevant parameter is 'start' and not 'nextid'

Fixes: 460488c58c ("idr: Remove idr_alloc_ext")
Signed-off-by: Ariel Marcovitch <arielmarcovitch@gmail.com>
Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-09-23 10:48:14 +02:00
Michael Bestas
1b59618ce4
Merge tag 'ASB-2023-09-05_4.19-stable' of https://android.googlesource.com/kernel/common into android13-4.19-kona
https://source.android.com/docs/security/bulletin/2023-09-01

* tag 'ASB-2023-09-05_4.19-stable' of https://android.googlesource.com/kernel/common:
  Linux 4.19.294
  Revert "ARM: ep93xx: fix missing-prototype warnings"
  Revert "MIPS: Alchemy: fix dbdma2"
  Linux 4.19.293
  dma-buf/sw_sync: Avoid recursive lock during fence signal
  clk: Fix undefined reference to `clk_rate_exclusive_{get,put}'
  scsi: core: raid_class: Remove raid_component_add()
  scsi: snic: Fix double free in snic_tgt_create()
  irqchip/mips-gic: Don't touch vl_map if a local interrupt is not routable
  rtnetlink: Reject negative ifindexes in RTM_NEWLINK
  netfilter: nf_queue: fix socket leak
  sched/rt: pick_next_rt_entity(): check list_entry
  mmc: block: Fix in_flight[issue_type] value error
  x86/fpu: Set X86_FEATURE_OSXSAVE feature after enabling OSXSAVE in CR4
  PCI: acpiphp: Use pci_assign_unassigned_bridge_resources() only for non-root bus
  media: vcodec: Fix potential array out-of-bounds in encoder queue_setup
  lib/clz_ctz.c: Fix __clzdi2() and __ctzdi2() for 32-bit kernels
  batman-adv: Fix batadv_v_ogm_aggr_send memory leak
  batman-adv: Fix TT global entry leak when client roamed back
  batman-adv: Do not get eth header before batadv_check_management_packet
  batman-adv: Don't increase MTU when set by user
  batman-adv: Trigger events for auto adjusted MTU
  nfsd: Fix race to FREE_STATEID and cl_revoked
  ibmveth: Use dcbf rather than dcbfl
  ipvs: fix racy memcpy in proc_do_sync_threshold
  ipvs: Improve robustness to the ipvs sysctl
  bonding: fix macvlan over alb bond support
  net: remove bond_slave_has_mac_rcu()
  net/sched: fix a qdisc modification with ambiguous command request
  igb: Avoid starting unnecessary workqueues
  dccp: annotate data-races in dccp_poll()
  sock: annotate data-races around prot->memory_pressure
  tracing: Fix memleak due to race between current_tracer and trace
  drm/amd/display: check TG is non-null before checking if enabled
  drm/amd/display: do not wait for mpc idle if tg is disabled
  regmap: Account for register length in SMBus I/O limits
  dm integrity: reduce vmalloc space footprint on 32-bit architectures
  dm integrity: increase RECALC_SECTORS to improve recalculate speed
  powerpc: Fail build if using recordmcount with binutils v2.37
  powerpc: remove leftover code of old GCC version checks
  powerpc/32: add stack protector support
  fbdev: fix potential OOB read in fast_imageblit()
  fbdev: Fix sys_imageblit() for arbitrary image widths
  fbdev: Improve performance of sys_imageblit()
  tty: serial: fsl_lpuart: add earlycon for imx8ulp platform
  Revert "tty: serial: fsl_lpuart: drop earlycon entry for i.MX8QXP"
  MIPS: cpu-features: Use boot_cpu_type for CPU type based features
  MIPS: cpu-features: Enable octeon_cache by cpu_type
  fs: dlm: fix mismatch of plock results from userspace
  fs: dlm: use dlm_plock_info for do_unlock_close
  fs: dlm: change plock interrupted message to debug again
  fs: dlm: add pid to debug log
  dlm: replace usage of found with dedicated list iterator variable
  dlm: improve plock logging if interrupted
  PCI: acpiphp: Reassign resources on bridge if necessary
  net: phy: broadcom: stub c45 read/write for 54810
  net: xfrm: Amend XFRMA_SEC_CTX nla_policy structure
  net: fix the RTO timer retransmitting skb every 1ms if linear option is enabled
  virtio-net: set queues after driver_ok
  af_unix: Fix null-ptr-deref in unix_stream_sendpage().
  netfilter: set default timeout to 3 secs for sctp shutdown send and recv state
  test_firmware: prevent race conditions by a correct implementation of locking
  mmc: wbsd: fix double mmc_free_host() in wbsd_init()
  cifs: Release folio lock on fscache read hit.
  ALSA: usb-audio: Add support for Mythware XA001AU capture and playback interfaces.
  serial: 8250: Fix oops for port->pm on uart_change_pm()
  ASoC: meson: axg-tdm-formatter: fix channel slot allocation
  ASoC: rt5665: add missed regulator_bulk_disable
  net: do not allow gso_size to be set to GSO_BY_FRAGS
  sock: Fix misuse of sk_under_memory_pressure()
  i40e: fix misleading debug logs
  team: Fix incorrect deletion of ETH_P_8021AD protocol vid from slaves
  netfilter: nft_dynset: disallow object maps
  selftests: mirror_gre_changes: Tighten up the TTL test match
  xfrm: add NULL check in xfrm_update_ae_params
  ip_vti: fix potential slab-use-after-free in decode_session6
  ip6_vti: fix slab-use-after-free in decode_session6
  xfrm: fix slab-use-after-free in decode_session6
  xfrm: interface: rename xfrm_interface.c to xfrm_interface_core.c
  net: af_key: fix sadb_x_filter validation
  net: xfrm: Fix xfrm_address_filter OOB read
  btrfs: fix BUG_ON condition in btrfs_cancel_balance
  powerpc/rtas_flash: allow user copy to flash block cache objects
  fbdev: mmp: fix value check in mmphw_probe()
  virtio-mmio: don't break lifecycle of vm_dev
  virtio-mmio: Use to_virtio_mmio_device() to simply code
  virtio-mmio: convert to devm_platform_ioremap_resource
  nfsd: Remove incorrect check in nfsd4_validate_stateid
  nfsd4: kill warnings on testing stateids with mismatched clientids
  block: fix signed int overflow in Amiga partition support
  mmc: sunxi: fix deferred probing
  mmc: bcm2835: fix deferred probing
  mmc: Remove dev_err() usage after platform_get_irq()
  mmc: tmio: move tmio_mmc_set_clock() to platform hook
  mmc: tmio: replace tmio_mmc_clk_stop() calls with tmio_mmc_set_clock()
  mmc: meson-gx: remove redundant mmc_request_done() call from irq context
  mmc: meson-gx: remove useless lock
  USB: dwc3: qcom: fix NULL-deref on suspend
  usb: dwc3: qcom: Add helper functions to enable,disable wake irqs
  irqchip/mips-gic: Use raw spinlock for gic_lock
  irqchip/mips-gic: Get rid of the reliance on irq_cpu_online()
  x86/topology: Fix erroneous smp_num_siblings on Intel Hybrid platforms
  powerpc/64s/radix: Fix soft dirty tracking
  powerpc: Move page table dump files in a dedicated subdirectory
  powerpc/mm: dump block address translation on book3s/32
  powerpc/mm: dump segment registers on book3s/32
  powerpc/mm: Move pgtable_t into platform headers
  powerpc/mm: move platform specific mmu-xxx.h in platform directories
  iio: addac: stx104: Fix race condition when converting analog-to-digital
  iio: addac: stx104: Fix race condition for stx104_write_raw()
  iio: adc: stx104: Implement and utilize register structures
  iio: adc: stx104: Utilize iomap interface
  iio: add addac subdirectory
  IMA: allow/fix UML builds
  drm/amdgpu: Fix potential fence use-after-free v2
  Bluetooth: L2CAP: Fix use-after-free
  pcmcia: rsrc_nonstatic: Fix memory leak in nonstatic_release_resource_db()
  gfs2: Fix possible data races in gfs2_show_options()
  media: platform: mediatek: vpu: fix NULL ptr dereference
  media: v4l2-mem2mem: add lock to protect parameter num_rdy
  FS: JFS: Check for read-only mounted filesystem in txBegin
  FS: JFS: Fix null-ptr-deref Read in txBegin
  MIPS: dec: prom: Address -Warray-bounds warning
  fs: jfs: Fix UBSAN: array-index-out-of-bounds in dbAllocDmapLev
  udf: Fix uninitialized array access for some pathnames
  HID: add quirk for 03f0:464a HP Elite Presenter Mouse
  quota: fix warning in dqgrab()
  quota: Properly disable quotas when add_dquot_ref() fails
  ALSA: emu10k1: roll up loops in DSP setup code for Audigy
  drm/radeon: Fix integer overflow in radeon_cs_parser_init
  selftests: forwarding: tc_flower: Relax success criterion
  lib/mpi: Eliminate unused umul_ppmm definitions for MIPS
  Revert "posix-timers: Ensure timer ID search-loop limit is valid"
  UPSTREAM: media: usb: siano: Fix warning due to null work_func_t function pointer
  UPSTREAM: Bluetooth: L2CAP: Fix use-after-free in l2cap_sock_ready_cb
  UPSTREAM: net/sched: cls_route: No longer copy tcf_result on update to avoid use-after-free
  UPSTREAM: net/sched: cls_u32: No longer copy tcf_result on update to avoid use-after-free
  Linux 4.19.292
  sch_netem: fix issues in netem_change() vs get_dist_table()
  alpha: remove __init annotation from exported page_is_ram()
  scsi: core: Fix possible memory leak if device_add() fails
  scsi: snic: Fix possible memory leak if device_add() fails
  scsi: 53c700: Check that command slot is not NULL
  scsi: storvsc: Fix handling of virtual Fibre Channel timeouts
  scsi: core: Fix legacy /proc parsing buffer overflow
  netfilter: nf_tables: report use refcount overflow
  netfilter: nf_tables: bogus EBUSY when deleting flowtable after flush
  btrfs: don't stop integrity writeback too early
  ibmvnic: Handle DMA unmapping of login buffs in release functions
  wifi: cfg80211: fix sband iftype data lookup for AP_VLAN
  IB/hfi1: Fix possible panic during hotplug remove
  drivers: net: prevent tun_build_skb() to exceed the packet size limit
  dccp: fix data-race around dp->dccps_mss_cache
  bonding: Fix incorrect deletion of ETH_P_8021AD protocol vid from slaves
  net/packet: annotate data-races around tp->status
  mISDN: Update parameter type of dsp_cmx_send()
  drm/nouveau/disp: Revert a NULL check inside nouveau_connector_get_modes
  x86: Move gds_ucode_mitigated() declaration to header
  x86/mm: Fix VDSO and VVAR placement on 5-level paging machines
  x86/cpu/amd: Enable Zenbleed fix for AMD Custom APU 0405
  usb: dwc3: Properly handle processing of pending events
  usb-storage: alauda: Fix uninit-value in alauda_check_media()
  binder: fix memory leak in binder_init()
  iio: cros_ec: Fix the allocation size for cros_ec_command
  nilfs2: fix use-after-free of nilfs_root in dirtying inodes via iput
  radix tree test suite: fix incorrect allocation size for pthreads
  drm/nouveau/gr: enable memory loads on helper invocation on all channels
  dmaengine: pl330: Return DMA_PAUSED when transaction is paused
  ipv6: adjust ndisc_is_useropt() to also return true for PIO
  mmc: moxart: read scr register without changing byte order
  sparc: fix up arch_cpu_finalize_init() build breakage.
  UPSTREAM: net/sched: cls_fw: Fix improper refcount update leads to use-after-free
  Linux 4.19.291
  drm/edid: fix objtool warning in drm_cvt_modes()
  arm64: dts: stratix10: fix incorrect I2C property for SCL signal
  drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions
  ARM: dts: nxp/imx6sll: fix wrong property name in usbphy node
  ARM: dts: imx6sll: fixup of operating points
  ARM: dts: imx: add usb alias
  ARM: dts: imx6sll: Make ssi node name same as other platforms
  PM: sleep: wakeirq: fix wake irq arming
  PM / wakeirq: support enabling wake-up irq after runtime_suspend called
  powerpc/mm/altmap: Fix altmap boundary check
  mtd: rawnand: omap_elm: Fix incorrect type in assignment
  test_firmware: return ENOMEM instead of ENOSPC on failed memory allocation
  test_firmware: fix a memory leak with reqs buffer
  ext2: Drop fragment support
  net: usbnet: Fix WARNING in usbnet_start_xmit/usb_submit_urb
  Bluetooth: L2CAP: Fix use-after-free in l2cap_sock_ready_cb
  fs/sysv: Null check to prevent null-ptr-deref bug
  USB: zaurus: Add ID for A-300/B-500/C-700
  libceph: fix potential hang in ceph_osdc_notify()
  scsi: zfcp: Defer fc_rport blocking until after ADISC response
  tcp_metrics: fix data-race in tcpm_suck_dst() vs fastopen
  tcp_metrics: annotate data-races around tm->tcpm_net
  tcp_metrics: annotate data-races around tm->tcpm_vals[]
  tcp_metrics: annotate data-races around tm->tcpm_lock
  tcp_metrics: annotate data-races around tm->tcpm_stamp
  tcp_metrics: fix addr_same() helper
  ip6mr: Fix skb_under_panic in ip6mr_cache_report()
  net/sched: cls_route: No longer copy tcf_result on update to avoid use-after-free
  net/sched: cls_u32: No longer copy tcf_result on update to avoid use-after-free
  net: add missing data-race annotation for sk_ll_usec
  net: add missing data-race annotations around sk->sk_peek_off
  net: sched: cls_u32: Fix match key mis-addressing
  perf test uprobe_from_different_cu: Skip if there is no gcc
  net/mlx5e: fix return value check in mlx5e_ipsec_remove_trailer()
  KVM: s390: fix sthyi error handling
  word-at-a-time: use the same return type for has_zero regardless of endianness
  loop: Select I/O scheduler 'none' from inside add_disk()
  perf: Fix function pointer case
  net/sched: cls_u32: Fix reference counter leak leading to overflow
  ASoC: cs42l51: fix driver to properly autoload with automatic module loading
  net/sched: sch_qfq: account for stab overhead in qfq_enqueue
  net/sched: cls_fw: Fix improper refcount update leads to use-after-free
  drm/client: Fix memory leak in drm_client_target_cloned
  dm cache policy smq: ensure IO doesn't prevent cleaner policy progress
  ASoC: wm8904: Fill the cache for WM8904_ADC_TEST_0 register
  s390/dasd: fix hanging device after quiesce/resume
  virtio-net: fix race between set queues and probe
  serial: 8250_dw: Preserve original value of DLF register
  serial: 8250_dw: split Synopsys DesignWare 8250 common functions
  irq-bcm6345-l1: Do not assume a fixed block to cpu mapping
  tpm_tis: Explicitly check for error code
  btrfs: check for commit error at btrfs_attach_transaction_barrier()
  hwmon: (nct7802) Fix for temp6 (PECI1) processed even if PECI1 disabled
  staging: ks7010: potential buffer overflow in ks_wlan_set_encode_ext()
  Documentation: security-bugs.rst: clarify CVE handling
  Documentation: security-bugs.rst: update preferences when dealing with the linux-distros group
  usb: xhci-mtk: set the dma max_seg_size
  USB: quirks: add quirk for Focusrite Scarlett
  usb: ohci-at91: Fix the unhandle interrupt when resume
  usb: dwc3: don't reset device side if dwc3 was configured as host-only
  usb: dwc3: pci: skip BYT GPIO lookup table for hardwired phy
  Revert "usb: dwc3: core: Enable AutoRetry feature in the controller"
  can: gs_usb: gs_can_close(): add missing set of CAN state to CAN_STATE_STOPPED
  USB: serial: simple: sort driver entries
  USB: serial: simple: add Kaufmann RKS+CAN VCP
  USB: serial: option: add Quectel EC200A module support
  USB: serial: option: support Quectel EM060K_128
  tracing: Fix warning in trace_buffered_event_disable()
  ring-buffer: Fix wrong stat of cpu_buffer->read
  ata: pata_ns87415: mark ns87560_tf_read static
  dm raid: fix missing reconfig_mutex unlock in raid_ctr() error paths
  block: Fix a source code comment in include/uapi/linux/blkzoned.h
  ASoC: fsl_spdif: Silence output on stop
  drm/msm: Fix IS_ERR_OR_NULL() vs NULL check in a5xx_submit_in_rb()
  RDMA/mlx4: Make check for invalid flags stricter
  benet: fix return value check in be_lancer_xmit_workarounds()
  net/sched: mqprio: Add length check for TCA_MQPRIO_{MAX/MIN}_RATE64
  net/sched: mqprio: add extack to mqprio_parse_nlattr()
  net/sched: mqprio: refactor nlattr parsing to a separate function
  platform/x86: msi-laptop: Fix rfkill out-of-sync on MSI Wind U100
  team: reset team's flags when down link is P2P device
  bonding: reset bond's flags when down link is P2P device
  tcp: Reduce chance of collisions in inet6_hashfn().
  ipv6 addrconf: fix bug where deleting a mngtmpaddr can create a new temporary address
  ethernet: atheros: fix return value check in atl1e_tso_csum()
  phy: hisilicon: Fix an out of bounds check in hisi_inno_phy_probe()
  i40e: Fix an NULL vs IS_ERR() bug for debugfs_create_dir()
  ext4: fix to check return value of freeze_bdev() in ext4_shutdown()
  scsi: qla2xxx: Array index may go out of bound
  scsi: qla2xxx: Fix inconsistent format argument type in qla_os.c
  ftrace: Fix possible warning on checking all pages used in ftrace_process_locs()
  ftrace: Store the order of pages allocated in ftrace_page
  ftrace: Check if pages were allocated before calling free_pages()
  ftrace: Add information on number of page groups allocated
  fs: dlm: interrupt posix locks only when process is killed
  dlm: rearrange async condition return
  dlm: cleanup plock_op vs plock_xop
  PCI/ASPM: Avoid link retraining race
  PCI/ASPM: Factor out pcie_wait_for_retrain()
  PCI/ASPM: Return 0 or -ETIMEDOUT from pcie_retrain_link()
  PCI: Rework pcie_retrain_link() wait loop
  ext4: Fix reusing stale buffer heads from last failed mounting
  ext4: rename journal_dev to s_journal_dev inside ext4_sb_info
  btrfs: fix extent buffer leak after tree mod log failure at split_node()
  bcache: Fix __bch_btree_node_alloc to make the failure behavior consistent
  bcache: remove 'int n' from parameter list of bch_bucket_alloc_set()
  bcache: use MAX_CACHES_PER_SET instead of magic number 8 in __bch_bucket_alloc_set
  gpio: tps68470: Make tps68470_gpio_output() always set the initial value
  tracing/histograms: Return an error if we fail to add histogram to hist_vars list
  tcp: annotate data-races around fastopenq.max_qlen
  tcp: annotate data-races around tp->notsent_lowat
  tcp: annotate data-races around rskq_defer_accept
  tcp: annotate data-races around tp->linger2
  net: Replace the limit of TCP_LINGER2 with TCP_FIN_TIMEOUT_MAX
  netfilter: nf_tables: can't schedule in nft_chain_validate
  netfilter: nf_tables: fix spurious set element insertion failure
  llc: Don't drop packet from non-root netns.
  fbdev: au1200fb: Fix missing IRQ check in au1200fb_drv_probe
  Revert "tcp: avoid the lookup process failing to get sk in ehash table"
  net:ipv6: check return value of pskb_trim()
  net: ethernet: ti: cpsw_ale: Fix cpsw_ale_get_field()/cpsw_ale_set_field()
  pinctrl: amd: Use amd_pinconf_set() for all config options
  fbdev: imxfb: warn about invalid left/right margin
  spi: bcm63xx: fix max prepend length
  igb: Fix igb_down hung on surprise removal
  wifi: iwlwifi: mvm: avoid baid size integer overflow
  wifi: wext-core: Fix -Wstringop-overflow warning in ioctl_standard_iw_point()
  bpf: Address KCSAN report on bpf_lru_list
  sched/fair: Don't balance task to its current running CPU
  posix-timers: Ensure timer ID search-loop limit is valid
  md/raid10: prevent soft lockup while flush writes
  md: fix data corruption for raid456 when reshape restart while grow up
  nbd: Add the maximum limit of allocated index in nbd_dev_add
  debugobjects: Recheck debug_objects_enabled before reporting
  ext4: correct inline offset when handling xattrs in inode body
  can: bcm: Fix UAF in bcm_proc_show()
  fuse: revalidate: don't invalidate if interrupted
  perf probe: Add test for regression introduced by switch to die_get_decl_file()
  tracing/histograms: Add histograms to hist_vars if they have referenced variables
  drm/atomic: Fix potential use-after-free in nonblocking commits
  scsi: qla2xxx: Pointer may be dereferenced
  scsi: qla2xxx: Check valid rport returned by fc_bsg_to_rport()
  scsi: qla2xxx: Fix potential NULL pointer dereference
  scsi: qla2xxx: Wait for io return on terminate rport
  xtensa: ISS: fix call to split_if_spec
  ring-buffer: Fix deadloop issue on reading trace_pipe
  tty: serial: samsung_tty: Fix a memory leak in s3c24xx_serial_getclk() when iterating clk
  tty: serial: samsung_tty: Fix a memory leak in s3c24xx_serial_getclk() in case of error
  Revert "8250: add support for ASIX devices with a FIFO bug"
  meson saradc: fix clock divider mask length
  ceph: don't let check_caps skip sending responses for revoke msgs
  hwrng: imx-rngc - fix the timeout for init and self check
  serial: atmel: don't enable IRQs prematurely
  fs: dlm: return positive pid value for F_GETLK
  md/raid0: add discard support for the 'original' layout
  misc: pci_endpoint_test: Re-init completion for every test
  misc: pci_endpoint_test: Free IRQs before removing the device
  PCI: rockchip: Use u32 variable to access 32-bit registers
  PCI: rockchip: Fix legacy IRQ generation for RK3399 PCIe endpoint core
  PCI: rockchip: Add poll and timeout to wait for PHY PLLs to be locked
  PCI: rockchip: Write PCI Device ID to correct register
  PCI: rockchip: Assert PCI Configuration Enable bit after probe
  PCI: qcom: Disable write access to read only registers for IP v2.3.3
  PCI: Add function 1 DMA alias quirk for Marvell 88SE9235
  PCI/PM: Avoid putting EloPOS E2/S2/H2 PCIe Ports in D3cold
  jfs: jfs_dmap: Validate db_l2nbperpage while mounting
  ext4: only update i_reserved_data_blocks on successful block allocation
  ext4: fix wrong unit use in ext4_mb_clear_bb
  perf intel-pt: Fix CYC timestamps after standalone CBR
  SUNRPC: Fix UAF in svc_tcp_listen_data_ready()
  net: bcmgenet: Ensure MDIO unregistration has clocks enabled
  tpm: tpm_vtpm_proxy: fix a race condition in /dev/vtpmx creation
  pinctrl: amd: Only use special debounce behavior for GPIO 0
  pinctrl: amd: Detect internal GPIO0 debounce handling
  pinctrl: amd: Fix mistake in handling clearing pins at startup
  net/sched: make psched_mtu() RTNL-less safe
  wifi: airo: avoid uninitialized warning in airo_get_rate()
  ipv6/addrconf: fix a potential refcount underflow for idev
  NTB: ntb_tool: Add check for devm_kcalloc
  NTB: ntb_transport: fix possible memory leak while device_register() fails
  ntb: intel: Fix error handling in intel_ntb_pci_driver_init()
  NTB: amd: Fix error handling in amd_ntb_pci_driver_init()
  ntb: idt: Fix error handling in idt_pci_driver_init()
  udp6: fix udp6_ehashfn() typo
  icmp6: Fix null-ptr-deref of ip6_null_entry->rt6i_idev in icmp6_dev().
  vrf: Increment Icmp6InMsgs on the original netdev
  net: mvneta: fix txq_map in case of txq_number==1
  workqueue: clean up WORK_* constant types, clarify masking
  net: lan743x: Don't sleep in atomic context
  netfilter: nf_tables: prevent OOB access in nft_byteorder_eval
  netfilter: conntrack: Avoid nf_ct_helper_hash uses after free
  netfilter: nf_tables: fix scheduling-while-atomic splat
  netfilter: nf_tables: unbind non-anonymous set if rule construction fails
  netfilter: nf_tables: reject unbound anonymous set before commit phase
  netfilter: nf_tables: add NFT_TRANS_PREPARE_ERROR to deal with bound set/chain
  netfilter: nf_tables: incorrect error path handling with NFT_MSG_NEWRULE
  netfilter: nf_tables: use net_generic infra for transaction data
  netfilter: add helper function to set up the nfnetlink header and use it
  netfilter: nftables: add helper function to set the base sequence number
  netfilter: nf_tables: add rescheduling points during loop detection walks
  netfilter: nf_tables: fix nat hook table deletion
  spi: spi-fsl-spi: allow changing bits_per_word while CS is still active
  spi: spi-fsl-spi: relax message sanity checking a little
  spi: spi-fsl-spi: remove always-true conditional in fsl_spi_do_one_msg
  ARM: orion5x: fix d2net gpio initialization
  btrfs: fix race when deleting quota root from the dirty cow roots list
  jffs2: reduce stack usage in jffs2_build_xattr_subsystem()
  integrity: Fix possible multiple allocation in integrity_inode_get()
  bcache: Remove unnecessary NULL point check in node allocations
  mmc: core: disable TRIM on Micron MTFC4GACAJCN-1M
  mmc: core: disable TRIM on Kingston EMMC04G-M627
  NFSD: add encoding of op_recall flag for write delegation
  ALSA: jack: Fix mutex call in snd_jack_report()
  i2c: xiic: Don't try to handle more interrupt events after error
  i2c: xiic: Defer xiic_wakeup() and __xiic_start_xfer() in xiic_process()
  sh: dma: Fix DMA channel offset calculation
  net/sched: act_pedit: Add size check for TCA_PEDIT_PARMS_EX
  tcp: annotate data races in __tcp_oow_rate_limited()
  net: bridge: keep ports without IFF_UNICAST_FLT in BR_PROMISC mode
  powerpc: allow PPC_EARLY_DEBUG_CPM only when SERIAL_CPM=y
  f2fs: fix error path handling in truncate_dnode()
  mailbox: ti-msgmgr: Fill non-message tx data fields with 0x0
  spi: bcm-qspi: return error if neither hif_mspi nor mspi is available
  Add MODULE_FIRMWARE() for FIRMWARE_TG357766.
  sctp: fix potential deadlock on &net->sctp.addr_wq_lock
  rtc: st-lpc: Release some resources in st_rtc_probe() in case of error
  mfd: stmpe: Only disable the regulators if they are enabled
  mfd: intel-lpss: Add missing check for platform_get_resource
  KVM: s390: fix KVM_S390_GET_CMMA_BITS for GFNs in memslot holes
  mfd: rt5033: Drop rt5033-battery sub-device
  usb: phy: phy-tahvo: fix memory leak in tahvo_usb_probe()
  extcon: Fix kernel doc of property capability fields to avoid warnings
  extcon: Fix kernel doc of property fields to avoid warnings
  media: usb: siano: Fix warning due to null work_func_t function pointer
  media: videodev2.h: Fix struct v4l2_input tuner index comment
  media: usb: Check az6007_read() return value
  sh: j2: Use ioremap() to translate device tree address into kernel memory
  w1: fix loop in w1_fini()
  block: change all __u32 annotations to __be32 in affs_hardblocks.h
  USB: serial: option: add LARA-R6 01B PIDs
  ARC: define ASM_NL and __ALIGN(_STR) outside #ifdef __ASSEMBLY__ guard
  ARCv2: entry: rewrite to enable use of double load/stores LDD/STD
  ARCv2: entry: avoid a branch
  ARCv2: entry: push out the Z flag unclobber from common EXCEPTION_PROLOGUE
  ARCv2: entry: comments about hardware auto-save on taken interrupts
  modpost: fix section mismatch message for R_ARM_{PC24,CALL,JUMP24}
  modpost: fix section mismatch message for R_ARM_ABS32
  crypto: nx - fix build warnings when DEBUG_FS is not enabled
  hwrng: virtio - Fix race on data_avail and actual data
  hwrng: virtio - always add a pending request
  hwrng: virtio - don't waste entropy
  hwrng: virtio - don't wait on cleanup
  hwrng: virtio - add an internal buffer
  pinctrl: at91-pio4: check return value of devm_kasprintf()
  perf dwarf-aux: Fix off-by-one in die_get_varname()
  pinctrl: cherryview: Return correct value if pin in push-pull mode
  PCI: Add pci_clear_master() stub for non-CONFIG_PCI
  scsi: 3w-xxxx: Add error handling for initialization failure in tw_probe()
  ALSA: ac97: Fix possible NULL dereference in snd_ac97_mixer
  drm/radeon: fix possible division-by-zero errors
  fbdev: omapfb: lcd_mipid: Fix an error handling path in mipid_spi_probe()
  arm64: dts: renesas: ulcb-kf: Remove flow control for SCIF1
  IB/hfi1: Fix sdma.h tx->num_descs off-by-one errors
  soc/fsl/qe: fix usb.c build errors
  ASoC: es8316: Increment max value for ALC Capture Target Volume control
  ARM: ep93xx: fix missing-prototype warnings
  drm/panel: simple: fix active size for Ampire AM-480272H3TMQW-T01H
  Input: adxl34x - do not hardcode interrupt trigger type
  ARM: dts: BCM5301X: Drop "clock-names" from the SPI node
  Input: drv260x - sleep between polling GO bit
  radeon: avoid double free in ci_dpm_init()
  netlink: Add __sock_i_ino() for __netlink_diag_dump().
  ipvlan: Fix return value of ipvlan_queue_xmit()
  netfilter: nf_conntrack_sip: fix the ct_sip_parse_numerical_param() return value.
  lib/ts_bm: reset initial match offset for every block of text
  gtp: Fix use-after-free in __gtp_encap_destroy().
  netlink: do not hard code device address lenth in fdb dumps
  netlink: fix potential deadlock in netlink_set_err()
  wifi: ath9k: convert msecs to jiffies where needed
  wifi: ath9k: Fix possible stall on ath9k_txq_list_has_key()
  memstick r592: make memstick_debug_get_tpc_name() static
  kexec: fix a memory leak in crash_shrink_memory()
  watchdog/perf: more properly prevent false positives with turbo modes
  watchdog/perf: define dummy watchdog_update_hrtimer_threshold() on correct config
  wifi: rsi: Do not set MMC_PM_KEEP_POWER in shutdown
  wifi: ath9k: don't allow to overwrite ENDPOINT0 attributes
  wifi: ray_cs: Fix an error handling path in ray_probe()
  wifi: ray_cs: Drop useless status variable in parse_addr()
  wifi: ray_cs: Utilize strnlen() in parse_addr()
  wifi: wl3501_cs: Fix an error handling path in wl3501_probe()
  wl3501_cs: use eth_hw_addr_set()
  net: create netdev->dev_addr assignment helpers
  wl3501_cs: Fix misspelling and provide missing documentation
  wl3501_cs: Remove unnecessary NULL check
  wl3501_cs: Fix a bunch of formatting issues related to function docs
  wifi: atmel: Fix an error handling path in atmel_probe()
  wifi: orinoco: Fix an error handling path in orinoco_cs_probe()
  wifi: orinoco: Fix an error handling path in spectrum_cs_probe()
  nfc: llcp: fix possible use of uninitialized variable in nfc_llcp_send_connect()
  nfc: constify several pointers to u8, char and sk_buff
  wifi: mwifiex: Fix the size of a memory allocation in mwifiex_ret_802_11_scan()
  samples/bpf: Fix buffer overflow in tcp_basertt
  wifi: ath9k: avoid referencing uninit memory in ath9k_wmi_ctrl_rx
  wifi: ath9k: fix AR9003 mac hardware hang check register offset calculation
  evm: Complete description of evm_inode_setattr()
  ARM: 9303/1: kprobes: avoid missing-declaration warnings
  PM: domains: fix integer overflow issues in genpd_parse_state()
  clocksource/drivers/cadence-ttc: Fix memory leak in ttc_timer_probe
  clocksource/drivers/cadence-ttc: Use ttc driver as platform driver
  clocksource/drivers: Unify the names to timer-* format
  irqchip/jcore-aic: Fix missing allocation of IRQ descriptors
  irqchip/jcore-aic: Kill use of irq_create_strict_mappings()
  md/raid10: fix io loss while replacement replace rdev
  md/raid10: fix wrong setting of max_corr_read_errors
  md/raid10: fix overflow of md/safe_mode_delay
  md/raid10: check slab-out-of-bounds in md_bitmap_get_counter
  treewide: Remove uninitialized_var() usage
  drm/amdgpu: Validate VM ioctl flags.
  scripts/tags.sh: Resolve gtags empty index generation
  drm/edid: Fix uninitialized variable in drm_cvt_modes()
  fbdev: imsttfb: Fix use after free bug in imsttfb_probe
  video: imsttfb: check for ioremap() failures
  x86/smp: Use dedicated cache-line for mwait_play_dead()
  gfs2: Don't deref jdesc in evict
  Linux 4.19.290
  x86: fix backwards merge of GDS/SRSO bit
  xen/netback: Fix buffer overrun triggered by unusual packet
  Documentation/x86: Fix backwards on/off logic about YMM support
  x86/xen: Fix secondary processors' FPU initialization
  KVM: Add GDS_NO support to KVM
  x86/speculation: Add Kconfig option for GDS
  x86/speculation: Add force option to GDS mitigation
  x86/speculation: Add Gather Data Sampling mitigation
  x86/fpu: Move FPU initialization into arch_cpu_finalize_init()
  x86/fpu: Mark init functions __init
  x86/fpu: Remove cpuinfo argument from init functions
  init, x86: Move mem_encrypt_init() into arch_cpu_finalize_init()
  init: Invoke arch_cpu_finalize_init() earlier
  init: Remove check_bugs() leftovers
  um/cpu: Switch to arch_cpu_finalize_init()
  sparc/cpu: Switch to arch_cpu_finalize_init()
  sh/cpu: Switch to arch_cpu_finalize_init()
  mips/cpu: Switch to arch_cpu_finalize_init()
  m68k/cpu: Switch to arch_cpu_finalize_init()
  ia64/cpu: Switch to arch_cpu_finalize_init()
  ARM: cpu: Switch to arch_cpu_finalize_init()
  x86/cpu: Switch to arch_cpu_finalize_init()
  init: Provide arch_cpu_finalize_init()

 Conflicts:
	drivers/mmc/core/block.c
	drivers/mmc/host/sdhci-msm.c
	drivers/usb/dwc3/core.c
	drivers/usb/dwc3/gadget.c

Change-Id: Id2f4d5c8067f8e5eda39c0eaa5e59d54a394b4c7
2023-09-19 18:11:03 +03:00
Greg Kroah-Hartman
ab7141647e This is the 4.19.293 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmTvUuwACgkQONu9yGCS
 aT7LpA/+N7Em43G700yL9LlPAwa6xWE22OMyidakDJfd2pZ/yfi7/rsdCKMpPi4o
 Y+jyax8jj1V473rAM1emBUpy8EMnJD+0Fh/279rO3C0F61wgt8QLU9M+8bb5g/lE
 IWziYXdugRoBsLvp22GYlNT1s/EAd1g5eWrUYkPaL0nZe6p1eF+rFF0+qUCbY77q
 q3jSh3SCeGPn9x3IGBwD7v21dA4ZlpIkbie3Pd8ARSKfeGKKaiRSVNH4xoEcimFt
 6j13d0VEdJC4Ew5Ir5S0oFHaTsYAR8EcKiJoaPsJ+SAUNh+RH2v3D+t8+oBbXkj5
 JxTRwohL2P9MQAW/xXrArwuKN4PghtJeE3xZGjkwS/wJzuQ0oqxfZwFNsU1p467O
 KkInV+soyD9GoAAzpbGO3GwgP1mybUOpLzS5ERwn43yKgOad6XjYiTw7PIzahgJ7
 gvBrqqOQMFOMrPoLhVzhWnUP9kcVSjvn49HJ9blX0sg5ShDra/q0bs8l9fSIAJnv
 GBZkV7CyqoZNULXjG8/jqlzijf5FpGwTX4mHJ1n2M58CskmXxqRt2bP/KmFzn8j/
 ny3aVIN06c6VTNZ4Cu2h9CC1T4ZW0CNteMzweHMY+0PU8Y3BA+XBQVnQ1F+r+TF5
 hbSxiPB5uYJJFfTkUlf8QMAfC7h1pbxgCy4YsJ1QlEt3Ai8ypo4=
 =gx/M
 -----END PGP SIGNATURE-----

Merge 4.19.293 into android-4.19-stable

Changes in 4.19.293
	lib/mpi: Eliminate unused umul_ppmm definitions for MIPS
	selftests: forwarding: tc_flower: Relax success criterion
	drm/radeon: Fix integer overflow in radeon_cs_parser_init
	ALSA: emu10k1: roll up loops in DSP setup code for Audigy
	quota: Properly disable quotas when add_dquot_ref() fails
	quota: fix warning in dqgrab()
	HID: add quirk for 03f0:464a HP Elite Presenter Mouse
	udf: Fix uninitialized array access for some pathnames
	fs: jfs: Fix UBSAN: array-index-out-of-bounds in dbAllocDmapLev
	MIPS: dec: prom: Address -Warray-bounds warning
	FS: JFS: Fix null-ptr-deref Read in txBegin
	FS: JFS: Check for read-only mounted filesystem in txBegin
	media: v4l2-mem2mem: add lock to protect parameter num_rdy
	media: platform: mediatek: vpu: fix NULL ptr dereference
	gfs2: Fix possible data races in gfs2_show_options()
	pcmcia: rsrc_nonstatic: Fix memory leak in nonstatic_release_resource_db()
	Bluetooth: L2CAP: Fix use-after-free
	drm/amdgpu: Fix potential fence use-after-free v2
	IMA: allow/fix UML builds
	iio: add addac subdirectory
	iio: adc: stx104: Utilize iomap interface
	iio: adc: stx104: Implement and utilize register structures
	iio: addac: stx104: Fix race condition for stx104_write_raw()
	iio: addac: stx104: Fix race condition when converting analog-to-digital
	powerpc/mm: move platform specific mmu-xxx.h in platform directories
	powerpc/mm: Move pgtable_t into platform headers
	powerpc/mm: dump segment registers on book3s/32
	powerpc/mm: dump block address translation on book3s/32
	powerpc: Move page table dump files in a dedicated subdirectory
	powerpc/64s/radix: Fix soft dirty tracking
	x86/topology: Fix erroneous smp_num_siblings on Intel Hybrid platforms
	irqchip/mips-gic: Get rid of the reliance on irq_cpu_online()
	irqchip/mips-gic: Use raw spinlock for gic_lock
	usb: dwc3: qcom: Add helper functions to enable,disable wake irqs
	USB: dwc3: qcom: fix NULL-deref on suspend
	mmc: meson-gx: remove useless lock
	mmc: meson-gx: remove redundant mmc_request_done() call from irq context
	mmc: tmio: replace tmio_mmc_clk_stop() calls with tmio_mmc_set_clock()
	mmc: tmio: move tmio_mmc_set_clock() to platform hook
	mmc: Remove dev_err() usage after platform_get_irq()
	mmc: bcm2835: fix deferred probing
	mmc: sunxi: fix deferred probing
	block: fix signed int overflow in Amiga partition support
	nfsd4: kill warnings on testing stateids with mismatched clientids
	nfsd: Remove incorrect check in nfsd4_validate_stateid
	virtio-mmio: convert to devm_platform_ioremap_resource
	virtio-mmio: Use to_virtio_mmio_device() to simply code
	virtio-mmio: don't break lifecycle of vm_dev
	fbdev: mmp: fix value check in mmphw_probe()
	powerpc/rtas_flash: allow user copy to flash block cache objects
	btrfs: fix BUG_ON condition in btrfs_cancel_balance
	net: xfrm: Fix xfrm_address_filter OOB read
	net: af_key: fix sadb_x_filter validation
	xfrm: interface: rename xfrm_interface.c to xfrm_interface_core.c
	xfrm: fix slab-use-after-free in decode_session6
	ip6_vti: fix slab-use-after-free in decode_session6
	ip_vti: fix potential slab-use-after-free in decode_session6
	xfrm: add NULL check in xfrm_update_ae_params
	selftests: mirror_gre_changes: Tighten up the TTL test match
	netfilter: nft_dynset: disallow object maps
	team: Fix incorrect deletion of ETH_P_8021AD protocol vid from slaves
	i40e: fix misleading debug logs
	sock: Fix misuse of sk_under_memory_pressure()
	net: do not allow gso_size to be set to GSO_BY_FRAGS
	ASoC: rt5665: add missed regulator_bulk_disable
	ASoC: meson: axg-tdm-formatter: fix channel slot allocation
	serial: 8250: Fix oops for port->pm on uart_change_pm()
	ALSA: usb-audio: Add support for Mythware XA001AU capture and playback interfaces.
	cifs: Release folio lock on fscache read hit.
	mmc: wbsd: fix double mmc_free_host() in wbsd_init()
	test_firmware: prevent race conditions by a correct implementation of locking
	netfilter: set default timeout to 3 secs for sctp shutdown send and recv state
	af_unix: Fix null-ptr-deref in unix_stream_sendpage().
	virtio-net: set queues after driver_ok
	net: fix the RTO timer retransmitting skb every 1ms if linear option is enabled
	net: xfrm: Amend XFRMA_SEC_CTX nla_policy structure
	net: phy: broadcom: stub c45 read/write for 54810
	PCI: acpiphp: Reassign resources on bridge if necessary
	dlm: improve plock logging if interrupted
	dlm: replace usage of found with dedicated list iterator variable
	fs: dlm: add pid to debug log
	fs: dlm: change plock interrupted message to debug again
	fs: dlm: use dlm_plock_info for do_unlock_close
	fs: dlm: fix mismatch of plock results from userspace
	MIPS: cpu-features: Enable octeon_cache by cpu_type
	MIPS: cpu-features: Use boot_cpu_type for CPU type based features
	Revert "tty: serial: fsl_lpuart: drop earlycon entry for i.MX8QXP"
	tty: serial: fsl_lpuart: add earlycon for imx8ulp platform
	fbdev: Improve performance of sys_imageblit()
	fbdev: Fix sys_imageblit() for arbitrary image widths
	fbdev: fix potential OOB read in fast_imageblit()
	powerpc/32: add stack protector support
	powerpc: remove leftover code of old GCC version checks
	powerpc: Fail build if using recordmcount with binutils v2.37
	dm integrity: increase RECALC_SECTORS to improve recalculate speed
	dm integrity: reduce vmalloc space footprint on 32-bit architectures
	regmap: Account for register length in SMBus I/O limits
	drm/amd/display: do not wait for mpc idle if tg is disabled
	drm/amd/display: check TG is non-null before checking if enabled
	tracing: Fix memleak due to race between current_tracer and trace
	sock: annotate data-races around prot->memory_pressure
	dccp: annotate data-races in dccp_poll()
	igb: Avoid starting unnecessary workqueues
	net/sched: fix a qdisc modification with ambiguous command request
	net: remove bond_slave_has_mac_rcu()
	bonding: fix macvlan over alb bond support
	ipvs: Improve robustness to the ipvs sysctl
	ipvs: fix racy memcpy in proc_do_sync_threshold
	ibmveth: Use dcbf rather than dcbfl
	nfsd: Fix race to FREE_STATEID and cl_revoked
	batman-adv: Trigger events for auto adjusted MTU
	batman-adv: Don't increase MTU when set by user
	batman-adv: Do not get eth header before batadv_check_management_packet
	batman-adv: Fix TT global entry leak when client roamed back
	batman-adv: Fix batadv_v_ogm_aggr_send memory leak
	lib/clz_ctz.c: Fix __clzdi2() and __ctzdi2() for 32-bit kernels
	media: vcodec: Fix potential array out-of-bounds in encoder queue_setup
	PCI: acpiphp: Use pci_assign_unassigned_bridge_resources() only for non-root bus
	x86/fpu: Set X86_FEATURE_OSXSAVE feature after enabling OSXSAVE in CR4
	mmc: block: Fix in_flight[issue_type] value error
	sched/rt: pick_next_rt_entity(): check list_entry
	netfilter: nf_queue: fix socket leak
	rtnetlink: Reject negative ifindexes in RTM_NEWLINK
	irqchip/mips-gic: Don't touch vl_map if a local interrupt is not routable
	scsi: snic: Fix double free in snic_tgt_create()
	scsi: core: raid_class: Remove raid_component_add()
	clk: Fix undefined reference to `clk_rate_exclusive_{get,put}'
	dma-buf/sw_sync: Avoid recursive lock during fence signal
	Linux 4.19.293

Change-Id: Idd55c28550596932baf6645b788c48b548cc6271
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-08-30 16:38:16 +00:00
Helge Deller
6c93b265da lib/clz_ctz.c: Fix __clzdi2() and __ctzdi2() for 32-bit kernels
commit 382d4cd1847517ffcb1800fd462b625db7b2ebea upstream.

The gcc compiler translates on some architectures the 64-bit
__builtin_clzll() function to a call to the libgcc function __clzdi2(),
which should take a 64-bit parameter on 32- and 64-bit platforms.

But in the current kernel code, the built-in __clzdi2() function is
defined to operate (wrongly) on 32-bit parameters if BITS_PER_LONG ==
32, thus the return values on 32-bit kernels are in the range from
[0..31] instead of the expected [0..63] range.

This patch fixes the in-kernel functions __clzdi2() and __ctzdi2() to
take a 64-bit parameter on 32-bit kernels as well, thus it makes the
functions identical for 32- and 64-bit kernels.

This bug went unnoticed since kernel 3.11 for over 10 years, and here
are some possible reasons for that:

 a) Some architectures have assembly instructions to count the bits and
    which are used instead of calling __clzdi2(), e.g. on x86 the bsr
    instruction and on ppc cntlz is used. On such architectures the
    wrong __clzdi2() implementation isn't used and as such the bug has
    no effect and won't be noticed.

 b) Some architectures link to libgcc.a, and the in-kernel weak
    functions get replaced by the correct 64-bit variants from libgcc.a.

 c) __builtin_clzll() and __clzdi2() doesn't seem to be used in many
    places in the kernel, and most likely only in uncritical functions,
    e.g. when printing hex values via seq_put_hex_ll(). The wrong return
    value will still print the correct number, but just in a wrong
    formatting (e.g. with too many leading zeroes).

 d) 32-bit kernels aren't used that much any longer, so they are less
    tested.

A trivial testcase to verify if the currently running 32-bit kernel is
affected by the bug is to look at the output of /proc/self/maps:

Here the kernel uses a correct implementation of __clzdi2():

  root@debian:~# cat /proc/self/maps
  00010000-00019000 r-xp 00000000 08:05 787324     /usr/bin/cat
  00019000-0001a000 rwxp 00009000 08:05 787324     /usr/bin/cat
  0001a000-0003b000 rwxp 00000000 00:00 0          [heap]
  f7551000-f770d000 r-xp 00000000 08:05 794765     /usr/lib/hppa-linux-gnu/libc.so.6
  ...

and this kernel uses the broken implementation of __clzdi2():

  root@debian:~# cat /proc/self/maps
  0000000010000-0000000019000 r-xp 00000000 000000008:000000005 787324  /usr/bin/cat
  0000000019000-000000001a000 rwxp 000000009000 000000008:000000005 787324  /usr/bin/cat
  000000001a000-000000003b000 rwxp 00000000 00:00 0  [heap]
  00000000f73d1000-00000000f758d000 r-xp 00000000 000000008:000000005 794765  /usr/lib/hppa-linux-gnu/libc.so.6
  ...

Signed-off-by: Helge Deller <deller@gmx.de>
Fixes: 4df87bb7b6 ("lib: add weak clz/ctz functions")
Cc: Chanho Min <chanho.min@lge.com>
Cc: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: stable@vger.kernel.org # v3.11+
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-30 16:31:55 +02:00
Mirsad Goran Todorovac
3127ab7eee test_firmware: prevent race conditions by a correct implementation of locking
commit 4acfe3dfde685a5a9eaec5555351918e2d7266a1 upstream.

Dan Carpenter spotted a race condition in a couple of situations like
these in the test_firmware driver:

static int test_dev_config_update_u8(const char *buf, size_t size, u8 *cfg)
{
        u8 val;
        int ret;

        ret = kstrtou8(buf, 10, &val);
        if (ret)
                return ret;

        mutex_lock(&test_fw_mutex);
        *(u8 *)cfg = val;
        mutex_unlock(&test_fw_mutex);

        /* Always return full write size even if we didn't consume all */
        return size;
}

static ssize_t config_num_requests_store(struct device *dev,
                                         struct device_attribute *attr,
                                         const char *buf, size_t count)
{
        int rc;

        mutex_lock(&test_fw_mutex);
        if (test_fw_config->reqs) {
                pr_err("Must call release_all_firmware prior to changing config\n");
                rc = -EINVAL;
                mutex_unlock(&test_fw_mutex);
                goto out;
        }
        mutex_unlock(&test_fw_mutex);

        rc = test_dev_config_update_u8(buf, count,
                                       &test_fw_config->num_requests);

out:
        return rc;
}

static ssize_t config_read_fw_idx_store(struct device *dev,
                                        struct device_attribute *attr,
                                        const char *buf, size_t count)
{
        return test_dev_config_update_u8(buf, count,
                                         &test_fw_config->read_fw_idx);
}

The function test_dev_config_update_u8() is called from both the locked
and the unlocked context, function config_num_requests_store() and
config_read_fw_idx_store() which can both be called asynchronously as
they are driver's methods, while test_dev_config_update_u8() and siblings
change their argument pointed to by u8 *cfg or similar pointer.

To avoid deadlock on test_fw_mutex, the lock is dropped before calling
test_dev_config_update_u8() and re-acquired within test_dev_config_update_u8()
itself, but alas this creates a race condition.

Having two locks wouldn't assure a race-proof mutual exclusion.

This situation is best avoided by the introduction of a new, unlocked
function __test_dev_config_update_u8() which can be called from the locked
context and reducing test_dev_config_update_u8() to:

static int test_dev_config_update_u8(const char *buf, size_t size, u8 *cfg)
{
        int ret;

        mutex_lock(&test_fw_mutex);
        ret = __test_dev_config_update_u8(buf, size, cfg);
        mutex_unlock(&test_fw_mutex);

        return ret;
}

doing the locking and calling the unlocked primitive, which enables both
locked and unlocked versions without duplication of code.

The similar approach was applied to all functions called from the locked
and the unlocked context, which safely mitigates both deadlocks and race
conditions in the driver.

__test_dev_config_update_bool(), __test_dev_config_update_u8() and
__test_dev_config_update_size_t() unlocked versions of the functions
were introduced to be called from the locked contexts as a workaround
without releasing the main driver's lock and thereof causing a race
condition.

The test_dev_config_update_bool(), test_dev_config_update_u8() and
test_dev_config_update_size_t() locked versions of the functions
are being called from driver methods without the unnecessary multiplying
of the locking and unlocking code for each method, and complicating
the code with saving of the return value across lock.

Fixes: 7feebfa487b92 ("test_firmware: add support for request_firmware_into_buf")
Cc: Luis Chamberlain <mcgrof@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Russ Weight <russell.h.weight@intel.com>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Tianfei Zhang <tianfei.zhang@intel.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Colin Ian King <colin.i.king@gmail.com>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: linux-kselftest@vger.kernel.org
Cc: stable@vger.kernel.org # v5.4
Suggested-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Mirsad Goran Todorovac <mirsad.todorovac@alu.unizg.hr>
Link: https://lore.kernel.org/r/20230509084746.48259-1-mirsad.todorovac@alu.unizg.hr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-30 16:31:50 +02:00
Nathan Chancellor
706221e6cd lib/mpi: Eliminate unused umul_ppmm definitions for MIPS
commit b0c091ae04f6746f541b9be91809e1f4f43e9a65 upstream.

Clang errors out when building this macro:

lib/mpi/generic_mpih-mul1.c:37:24: error: invalid use of a cast in a
inline asm context requiring an l-value: remove the cast or build with
-fheinous-gnu-extensions
                umul_ppmm(prod_high, prod_low, s1_ptr[j], s2_limb);
                ~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lib/mpi/longlong.h:652:20: note: expanded from macro 'umul_ppmm'
        : "=l" ((USItype)(w0)), \
                ~~~~~~~~~~^~~
lib/mpi/generic_mpih-mul1.c:37:3: error: invalid output constraint '=h'
in asm
                umul_ppmm(prod_high, prod_low, s1_ptr[j], s2_limb);
                ^
lib/mpi/longlong.h:653:7: note: expanded from macro 'umul_ppmm'
             "=h" ((USItype)(w1)) \
             ^
2 errors generated.

The C version that is used for GCC 4.4 and up works well with clang;
however, it is not currently being used because Clang masks itself
as GCC 4.2.1 for compatibility reasons. As Nick points out, we require
GCC 4.6 and newer in the kernel so we can eliminate all of the
versioning checks and just use the C version of umul_ppmm for all
supported compilers.

Link: https://github.com/ClangBuiltLinux/linux/issues/605
Suggested-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-30 16:31:41 +02:00
Greg Kroah-Hartman
813e482b1b This is the 4.19.291 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmTWBMYACgkQONu9yGCS
 aT5fcw//f8IqgXhnM1RmdENWcj8Yttld1jY0L8+z2fRvkzmuqFJAnOuTEP/BV9Zk
 iMNH6Hg5iZh/ajGyW4OxsWHvaDNyZtpPOgNtQkhHPPDq5tqAgg+8ZgPlZkmbvnGd
 askxaSJE7OuJOfG193o/Uf0CR/boSIN1ioIu0vumqhrP2NUbe44/PLeSB239ZdGy
 nIaBo1JXffOH8P7kSS4E9NSrfoA9MQEuJgcYPkc1c08W2FWO8MftM/hdQtXGwbNC
 LCy4yGc3PN40MT7tOsXE0w3P+ZUXfP6g8NgHooRKuLimSiAYodLgCwnvELZ/Nsg+
 w1TPDxbLD99te5J16GzlzhN4+9BUtf2qq9ZgiJQ8lmKaGc+hAMRKF2h2E5Qhla8R
 TJubYFjD5yilANlRumVHMzNJZntROw0hG0ZIX6An/1QM5JAy7B736jI6jt+RZFSx
 r08xhBXcO+m3s2Vc2OojJFKLot9i0ugiKkTuQBZsBFDfcOtSrUUarB6Vz6wZvCY8
 sojQOS0eoYb+2GlKJ0UzTPLEHrCpusRkEnv3QMAPfTkw6vqvkrYACfOEbBujfT8e
 TtC7wuS3beULYPKpObe9HrpCooOXX8YQFXyld5e5iBINXwt/UT4daDL85BbMsPEu
 MPaSKrTMGXUsRoOWHiuPumT/MDE5LBSCqhyi41k90R9qRW6M+Wk=
 =KuAb
 -----END PGP SIGNATURE-----

Merge 4.19.291 into android-4.19-stable

Changes in 4.19.291
	gfs2: Don't deref jdesc in evict
	x86/smp: Use dedicated cache-line for mwait_play_dead()
	video: imsttfb: check for ioremap() failures
	fbdev: imsttfb: Fix use after free bug in imsttfb_probe
	drm/edid: Fix uninitialized variable in drm_cvt_modes()
	scripts/tags.sh: Resolve gtags empty index generation
	drm/amdgpu: Validate VM ioctl flags.
	treewide: Remove uninitialized_var() usage
	md/raid10: check slab-out-of-bounds in md_bitmap_get_counter
	md/raid10: fix overflow of md/safe_mode_delay
	md/raid10: fix wrong setting of max_corr_read_errors
	md/raid10: fix io loss while replacement replace rdev
	irqchip/jcore-aic: Kill use of irq_create_strict_mappings()
	irqchip/jcore-aic: Fix missing allocation of IRQ descriptors
	clocksource/drivers: Unify the names to timer-* format
	clocksource/drivers/cadence-ttc: Use ttc driver as platform driver
	clocksource/drivers/cadence-ttc: Fix memory leak in ttc_timer_probe
	PM: domains: fix integer overflow issues in genpd_parse_state()
	ARM: 9303/1: kprobes: avoid missing-declaration warnings
	evm: Complete description of evm_inode_setattr()
	wifi: ath9k: fix AR9003 mac hardware hang check register offset calculation
	wifi: ath9k: avoid referencing uninit memory in ath9k_wmi_ctrl_rx
	samples/bpf: Fix buffer overflow in tcp_basertt
	wifi: mwifiex: Fix the size of a memory allocation in mwifiex_ret_802_11_scan()
	nfc: constify several pointers to u8, char and sk_buff
	nfc: llcp: fix possible use of uninitialized variable in nfc_llcp_send_connect()
	wifi: orinoco: Fix an error handling path in spectrum_cs_probe()
	wifi: orinoco: Fix an error handling path in orinoco_cs_probe()
	wifi: atmel: Fix an error handling path in atmel_probe()
	wl3501_cs: Fix a bunch of formatting issues related to function docs
	wl3501_cs: Remove unnecessary NULL check
	wl3501_cs: Fix misspelling and provide missing documentation
	net: create netdev->dev_addr assignment helpers
	wl3501_cs: use eth_hw_addr_set()
	wifi: wl3501_cs: Fix an error handling path in wl3501_probe()
	wifi: ray_cs: Utilize strnlen() in parse_addr()
	wifi: ray_cs: Drop useless status variable in parse_addr()
	wifi: ray_cs: Fix an error handling path in ray_probe()
	wifi: ath9k: don't allow to overwrite ENDPOINT0 attributes
	wifi: rsi: Do not set MMC_PM_KEEP_POWER in shutdown
	watchdog/perf: define dummy watchdog_update_hrtimer_threshold() on correct config
	watchdog/perf: more properly prevent false positives with turbo modes
	kexec: fix a memory leak in crash_shrink_memory()
	memstick r592: make memstick_debug_get_tpc_name() static
	wifi: ath9k: Fix possible stall on ath9k_txq_list_has_key()
	wifi: ath9k: convert msecs to jiffies where needed
	netlink: fix potential deadlock in netlink_set_err()
	netlink: do not hard code device address lenth in fdb dumps
	gtp: Fix use-after-free in __gtp_encap_destroy().
	lib/ts_bm: reset initial match offset for every block of text
	netfilter: nf_conntrack_sip: fix the ct_sip_parse_numerical_param() return value.
	ipvlan: Fix return value of ipvlan_queue_xmit()
	netlink: Add __sock_i_ino() for __netlink_diag_dump().
	radeon: avoid double free in ci_dpm_init()
	Input: drv260x - sleep between polling GO bit
	ARM: dts: BCM5301X: Drop "clock-names" from the SPI node
	Input: adxl34x - do not hardcode interrupt trigger type
	drm/panel: simple: fix active size for Ampire AM-480272H3TMQW-T01H
	ARM: ep93xx: fix missing-prototype warnings
	ASoC: es8316: Increment max value for ALC Capture Target Volume control
	soc/fsl/qe: fix usb.c build errors
	IB/hfi1: Fix sdma.h tx->num_descs off-by-one errors
	arm64: dts: renesas: ulcb-kf: Remove flow control for SCIF1
	fbdev: omapfb: lcd_mipid: Fix an error handling path in mipid_spi_probe()
	drm/radeon: fix possible division-by-zero errors
	ALSA: ac97: Fix possible NULL dereference in snd_ac97_mixer
	scsi: 3w-xxxx: Add error handling for initialization failure in tw_probe()
	PCI: Add pci_clear_master() stub for non-CONFIG_PCI
	pinctrl: cherryview: Return correct value if pin in push-pull mode
	perf dwarf-aux: Fix off-by-one in die_get_varname()
	pinctrl: at91-pio4: check return value of devm_kasprintf()
	hwrng: virtio - add an internal buffer
	hwrng: virtio - don't wait on cleanup
	hwrng: virtio - don't waste entropy
	hwrng: virtio - always add a pending request
	hwrng: virtio - Fix race on data_avail and actual data
	crypto: nx - fix build warnings when DEBUG_FS is not enabled
	modpost: fix section mismatch message for R_ARM_ABS32
	modpost: fix section mismatch message for R_ARM_{PC24,CALL,JUMP24}
	ARCv2: entry: comments about hardware auto-save on taken interrupts
	ARCv2: entry: push out the Z flag unclobber from common EXCEPTION_PROLOGUE
	ARCv2: entry: avoid a branch
	ARCv2: entry: rewrite to enable use of double load/stores LDD/STD
	ARC: define ASM_NL and __ALIGN(_STR) outside #ifdef __ASSEMBLY__ guard
	USB: serial: option: add LARA-R6 01B PIDs
	block: change all __u32 annotations to __be32 in affs_hardblocks.h
	w1: fix loop in w1_fini()
	sh: j2: Use ioremap() to translate device tree address into kernel memory
	media: usb: Check az6007_read() return value
	media: videodev2.h: Fix struct v4l2_input tuner index comment
	media: usb: siano: Fix warning due to null work_func_t function pointer
	extcon: Fix kernel doc of property fields to avoid warnings
	extcon: Fix kernel doc of property capability fields to avoid warnings
	usb: phy: phy-tahvo: fix memory leak in tahvo_usb_probe()
	mfd: rt5033: Drop rt5033-battery sub-device
	KVM: s390: fix KVM_S390_GET_CMMA_BITS for GFNs in memslot holes
	mfd: intel-lpss: Add missing check for platform_get_resource
	mfd: stmpe: Only disable the regulators if they are enabled
	rtc: st-lpc: Release some resources in st_rtc_probe() in case of error
	sctp: fix potential deadlock on &net->sctp.addr_wq_lock
	Add MODULE_FIRMWARE() for FIRMWARE_TG357766.
	spi: bcm-qspi: return error if neither hif_mspi nor mspi is available
	mailbox: ti-msgmgr: Fill non-message tx data fields with 0x0
	f2fs: fix error path handling in truncate_dnode()
	powerpc: allow PPC_EARLY_DEBUG_CPM only when SERIAL_CPM=y
	net: bridge: keep ports without IFF_UNICAST_FLT in BR_PROMISC mode
	tcp: annotate data races in __tcp_oow_rate_limited()
	net/sched: act_pedit: Add size check for TCA_PEDIT_PARMS_EX
	sh: dma: Fix DMA channel offset calculation
	i2c: xiic: Defer xiic_wakeup() and __xiic_start_xfer() in xiic_process()
	i2c: xiic: Don't try to handle more interrupt events after error
	ALSA: jack: Fix mutex call in snd_jack_report()
	NFSD: add encoding of op_recall flag for write delegation
	mmc: core: disable TRIM on Kingston EMMC04G-M627
	mmc: core: disable TRIM on Micron MTFC4GACAJCN-1M
	bcache: Remove unnecessary NULL point check in node allocations
	integrity: Fix possible multiple allocation in integrity_inode_get()
	jffs2: reduce stack usage in jffs2_build_xattr_subsystem()
	btrfs: fix race when deleting quota root from the dirty cow roots list
	ARM: orion5x: fix d2net gpio initialization
	spi: spi-fsl-spi: remove always-true conditional in fsl_spi_do_one_msg
	spi: spi-fsl-spi: relax message sanity checking a little
	spi: spi-fsl-spi: allow changing bits_per_word while CS is still active
	netfilter: nf_tables: fix nat hook table deletion
	netfilter: nf_tables: add rescheduling points during loop detection walks
	netfilter: nftables: add helper function to set the base sequence number
	netfilter: add helper function to set up the nfnetlink header and use it
	netfilter: nf_tables: use net_generic infra for transaction data
	netfilter: nf_tables: incorrect error path handling with NFT_MSG_NEWRULE
	netfilter: nf_tables: add NFT_TRANS_PREPARE_ERROR to deal with bound set/chain
	netfilter: nf_tables: reject unbound anonymous set before commit phase
	netfilter: nf_tables: unbind non-anonymous set if rule construction fails
	netfilter: nf_tables: fix scheduling-while-atomic splat
	netfilter: conntrack: Avoid nf_ct_helper_hash uses after free
	netfilter: nf_tables: prevent OOB access in nft_byteorder_eval
	net: lan743x: Don't sleep in atomic context
	workqueue: clean up WORK_* constant types, clarify masking
	net: mvneta: fix txq_map in case of txq_number==1
	vrf: Increment Icmp6InMsgs on the original netdev
	icmp6: Fix null-ptr-deref of ip6_null_entry->rt6i_idev in icmp6_dev().
	udp6: fix udp6_ehashfn() typo
	ntb: idt: Fix error handling in idt_pci_driver_init()
	NTB: amd: Fix error handling in amd_ntb_pci_driver_init()
	ntb: intel: Fix error handling in intel_ntb_pci_driver_init()
	NTB: ntb_transport: fix possible memory leak while device_register() fails
	NTB: ntb_tool: Add check for devm_kcalloc
	ipv6/addrconf: fix a potential refcount underflow for idev
	wifi: airo: avoid uninitialized warning in airo_get_rate()
	net/sched: make psched_mtu() RTNL-less safe
	pinctrl: amd: Fix mistake in handling clearing pins at startup
	pinctrl: amd: Detect internal GPIO0 debounce handling
	pinctrl: amd: Only use special debounce behavior for GPIO 0
	tpm: tpm_vtpm_proxy: fix a race condition in /dev/vtpmx creation
	net: bcmgenet: Ensure MDIO unregistration has clocks enabled
	SUNRPC: Fix UAF in svc_tcp_listen_data_ready()
	perf intel-pt: Fix CYC timestamps after standalone CBR
	ext4: fix wrong unit use in ext4_mb_clear_bb
	ext4: only update i_reserved_data_blocks on successful block allocation
	jfs: jfs_dmap: Validate db_l2nbperpage while mounting
	PCI/PM: Avoid putting EloPOS E2/S2/H2 PCIe Ports in D3cold
	PCI: Add function 1 DMA alias quirk for Marvell 88SE9235
	PCI: qcom: Disable write access to read only registers for IP v2.3.3
	PCI: rockchip: Assert PCI Configuration Enable bit after probe
	PCI: rockchip: Write PCI Device ID to correct register
	PCI: rockchip: Add poll and timeout to wait for PHY PLLs to be locked
	PCI: rockchip: Fix legacy IRQ generation for RK3399 PCIe endpoint core
	PCI: rockchip: Use u32 variable to access 32-bit registers
	misc: pci_endpoint_test: Free IRQs before removing the device
	misc: pci_endpoint_test: Re-init completion for every test
	md/raid0: add discard support for the 'original' layout
	fs: dlm: return positive pid value for F_GETLK
	serial: atmel: don't enable IRQs prematurely
	hwrng: imx-rngc - fix the timeout for init and self check
	ceph: don't let check_caps skip sending responses for revoke msgs
	meson saradc: fix clock divider mask length
	Revert "8250: add support for ASIX devices with a FIFO bug"
	tty: serial: samsung_tty: Fix a memory leak in s3c24xx_serial_getclk() in case of error
	tty: serial: samsung_tty: Fix a memory leak in s3c24xx_serial_getclk() when iterating clk
	ring-buffer: Fix deadloop issue on reading trace_pipe
	xtensa: ISS: fix call to split_if_spec
	scsi: qla2xxx: Wait for io return on terminate rport
	scsi: qla2xxx: Fix potential NULL pointer dereference
	scsi: qla2xxx: Check valid rport returned by fc_bsg_to_rport()
	scsi: qla2xxx: Pointer may be dereferenced
	drm/atomic: Fix potential use-after-free in nonblocking commits
	tracing/histograms: Add histograms to hist_vars if they have referenced variables
	perf probe: Add test for regression introduced by switch to die_get_decl_file()
	fuse: revalidate: don't invalidate if interrupted
	can: bcm: Fix UAF in bcm_proc_show()
	ext4: correct inline offset when handling xattrs in inode body
	debugobjects: Recheck debug_objects_enabled before reporting
	nbd: Add the maximum limit of allocated index in nbd_dev_add
	md: fix data corruption for raid456 when reshape restart while grow up
	md/raid10: prevent soft lockup while flush writes
	posix-timers: Ensure timer ID search-loop limit is valid
	sched/fair: Don't balance task to its current running CPU
	bpf: Address KCSAN report on bpf_lru_list
	wifi: wext-core: Fix -Wstringop-overflow warning in ioctl_standard_iw_point()
	wifi: iwlwifi: mvm: avoid baid size integer overflow
	igb: Fix igb_down hung on surprise removal
	spi: bcm63xx: fix max prepend length
	fbdev: imxfb: warn about invalid left/right margin
	pinctrl: amd: Use amd_pinconf_set() for all config options
	net: ethernet: ti: cpsw_ale: Fix cpsw_ale_get_field()/cpsw_ale_set_field()
	net:ipv6: check return value of pskb_trim()
	Revert "tcp: avoid the lookup process failing to get sk in ehash table"
	fbdev: au1200fb: Fix missing IRQ check in au1200fb_drv_probe
	llc: Don't drop packet from non-root netns.
	netfilter: nf_tables: fix spurious set element insertion failure
	netfilter: nf_tables: can't schedule in nft_chain_validate
	net: Replace the limit of TCP_LINGER2 with TCP_FIN_TIMEOUT_MAX
	tcp: annotate data-races around tp->linger2
	tcp: annotate data-races around rskq_defer_accept
	tcp: annotate data-races around tp->notsent_lowat
	tcp: annotate data-races around fastopenq.max_qlen
	tracing/histograms: Return an error if we fail to add histogram to hist_vars list
	gpio: tps68470: Make tps68470_gpio_output() always set the initial value
	bcache: use MAX_CACHES_PER_SET instead of magic number 8 in __bch_bucket_alloc_set
	bcache: remove 'int n' from parameter list of bch_bucket_alloc_set()
	bcache: Fix __bch_btree_node_alloc to make the failure behavior consistent
	btrfs: fix extent buffer leak after tree mod log failure at split_node()
	ext4: rename journal_dev to s_journal_dev inside ext4_sb_info
	ext4: Fix reusing stale buffer heads from last failed mounting
	PCI: Rework pcie_retrain_link() wait loop
	PCI/ASPM: Return 0 or -ETIMEDOUT from pcie_retrain_link()
	PCI/ASPM: Factor out pcie_wait_for_retrain()
	PCI/ASPM: Avoid link retraining race
	dlm: cleanup plock_op vs plock_xop
	dlm: rearrange async condition return
	fs: dlm: interrupt posix locks only when process is killed
	ftrace: Add information on number of page groups allocated
	ftrace: Check if pages were allocated before calling free_pages()
	ftrace: Store the order of pages allocated in ftrace_page
	ftrace: Fix possible warning on checking all pages used in ftrace_process_locs()
	scsi: qla2xxx: Fix inconsistent format argument type in qla_os.c
	scsi: qla2xxx: Array index may go out of bound
	ext4: fix to check return value of freeze_bdev() in ext4_shutdown()
	i40e: Fix an NULL vs IS_ERR() bug for debugfs_create_dir()
	phy: hisilicon: Fix an out of bounds check in hisi_inno_phy_probe()
	ethernet: atheros: fix return value check in atl1e_tso_csum()
	ipv6 addrconf: fix bug where deleting a mngtmpaddr can create a new temporary address
	tcp: Reduce chance of collisions in inet6_hashfn().
	bonding: reset bond's flags when down link is P2P device
	team: reset team's flags when down link is P2P device
	platform/x86: msi-laptop: Fix rfkill out-of-sync on MSI Wind U100
	net/sched: mqprio: refactor nlattr parsing to a separate function
	net/sched: mqprio: add extack to mqprio_parse_nlattr()
	net/sched: mqprio: Add length check for TCA_MQPRIO_{MAX/MIN}_RATE64
	benet: fix return value check in be_lancer_xmit_workarounds()
	RDMA/mlx4: Make check for invalid flags stricter
	drm/msm: Fix IS_ERR_OR_NULL() vs NULL check in a5xx_submit_in_rb()
	ASoC: fsl_spdif: Silence output on stop
	block: Fix a source code comment in include/uapi/linux/blkzoned.h
	dm raid: fix missing reconfig_mutex unlock in raid_ctr() error paths
	ata: pata_ns87415: mark ns87560_tf_read static
	ring-buffer: Fix wrong stat of cpu_buffer->read
	tracing: Fix warning in trace_buffered_event_disable()
	USB: serial: option: support Quectel EM060K_128
	USB: serial: option: add Quectel EC200A module support
	USB: serial: simple: add Kaufmann RKS+CAN VCP
	USB: serial: simple: sort driver entries
	can: gs_usb: gs_can_close(): add missing set of CAN state to CAN_STATE_STOPPED
	Revert "usb: dwc3: core: Enable AutoRetry feature in the controller"
	usb: dwc3: pci: skip BYT GPIO lookup table for hardwired phy
	usb: dwc3: don't reset device side if dwc3 was configured as host-only
	usb: ohci-at91: Fix the unhandle interrupt when resume
	USB: quirks: add quirk for Focusrite Scarlett
	usb: xhci-mtk: set the dma max_seg_size
	Documentation: security-bugs.rst: update preferences when dealing with the linux-distros group
	Documentation: security-bugs.rst: clarify CVE handling
	staging: ks7010: potential buffer overflow in ks_wlan_set_encode_ext()
	hwmon: (nct7802) Fix for temp6 (PECI1) processed even if PECI1 disabled
	btrfs: check for commit error at btrfs_attach_transaction_barrier()
	tpm_tis: Explicitly check for error code
	irq-bcm6345-l1: Do not assume a fixed block to cpu mapping
	serial: 8250_dw: split Synopsys DesignWare 8250 common functions
	serial: 8250_dw: Preserve original value of DLF register
	virtio-net: fix race between set queues and probe
	s390/dasd: fix hanging device after quiesce/resume
	ASoC: wm8904: Fill the cache for WM8904_ADC_TEST_0 register
	dm cache policy smq: ensure IO doesn't prevent cleaner policy progress
	drm/client: Fix memory leak in drm_client_target_cloned
	net/sched: cls_fw: Fix improper refcount update leads to use-after-free
	net/sched: sch_qfq: account for stab overhead in qfq_enqueue
	ASoC: cs42l51: fix driver to properly autoload with automatic module loading
	net/sched: cls_u32: Fix reference counter leak leading to overflow
	perf: Fix function pointer case
	loop: Select I/O scheduler 'none' from inside add_disk()
	word-at-a-time: use the same return type for has_zero regardless of endianness
	KVM: s390: fix sthyi error handling
	net/mlx5e: fix return value check in mlx5e_ipsec_remove_trailer()
	perf test uprobe_from_different_cu: Skip if there is no gcc
	net: sched: cls_u32: Fix match key mis-addressing
	net: add missing data-race annotations around sk->sk_peek_off
	net: add missing data-race annotation for sk_ll_usec
	net/sched: cls_u32: No longer copy tcf_result on update to avoid use-after-free
	net/sched: cls_route: No longer copy tcf_result on update to avoid use-after-free
	ip6mr: Fix skb_under_panic in ip6mr_cache_report()
	tcp_metrics: fix addr_same() helper
	tcp_metrics: annotate data-races around tm->tcpm_stamp
	tcp_metrics: annotate data-races around tm->tcpm_lock
	tcp_metrics: annotate data-races around tm->tcpm_vals[]
	tcp_metrics: annotate data-races around tm->tcpm_net
	tcp_metrics: fix data-race in tcpm_suck_dst() vs fastopen
	scsi: zfcp: Defer fc_rport blocking until after ADISC response
	libceph: fix potential hang in ceph_osdc_notify()
	USB: zaurus: Add ID for A-300/B-500/C-700
	fs/sysv: Null check to prevent null-ptr-deref bug
	Bluetooth: L2CAP: Fix use-after-free in l2cap_sock_ready_cb
	net: usbnet: Fix WARNING in usbnet_start_xmit/usb_submit_urb
	ext2: Drop fragment support
	test_firmware: fix a memory leak with reqs buffer
	test_firmware: return ENOMEM instead of ENOSPC on failed memory allocation
	mtd: rawnand: omap_elm: Fix incorrect type in assignment
	powerpc/mm/altmap: Fix altmap boundary check
	PM / wakeirq: support enabling wake-up irq after runtime_suspend called
	PM: sleep: wakeirq: fix wake irq arming
	ARM: dts: imx6sll: Make ssi node name same as other platforms
	ARM: dts: imx: add usb alias
	ARM: dts: imx6sll: fixup of operating points
	ARM: dts: nxp/imx6sll: fix wrong property name in usbphy node
	drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions
	arm64: dts: stratix10: fix incorrect I2C property for SCL signal
	drm/edid: fix objtool warning in drm_cvt_modes()
	Linux 4.19.291

Change-Id: I4f78e25efd18415989ecf5e227a17e05b0d6386c
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-08-25 11:24:56 +00:00
Mirsad Goran Todorovac
d24ccc6bca test_firmware: return ENOMEM instead of ENOSPC on failed memory allocation
commit 7dae593cd226a0bca61201cf85ceb9335cf63682 upstream.

In a couple of situations like

	name = kstrndup(buf, count, GFP_KERNEL);
	if (!name)
		return -ENOSPC;

the error is not actually "No space left on device", but "Out of memory".

It is semantically correct to return -ENOMEM in all failed kstrndup()
and kzalloc() cases in this driver, as it is not a problem with disk
space, but with kernel memory allocator failing allocation.

The semantically correct should be:

        name = kstrndup(buf, count, GFP_KERNEL);
        if (!name)
                return -ENOMEM;

Cc: Dan Carpenter <error27@gmail.com>
Cc: Takashi Iwai <tiwai@suse.de>
Cc: Kees Cook <keescook@chromium.org>
Cc: "Luis R. Rodriguez" <mcgrof@ruslug.rutgers.edu>
Cc: Scott Branden <sbranden@broadcom.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Brian Norris <briannorris@chromium.org>
Fixes: c92316bf8e ("test_firmware: add batched firmware tests")
Fixes: 0a8adf5847 ("test: add firmware_class loader test")
Fixes: 548193cba2a7d ("test_firmware: add support for firmware_request_platform")
Fixes: eb910947c8 ("test: firmware_class: add asynchronous request trigger")
Fixes: 061132d2b9 ("test_firmware: add test custom fallback trigger")
Fixes: 7feebfa487b92 ("test_firmware: add support for request_firmware_into_buf")
Signed-off-by: Mirsad Goran Todorovac <mirsad.todorovac@alu.unizg.hr>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Message-ID: <20230606070808.9300-1-mirsad.todorovac@alu.unizg.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-11 11:45:39 +02:00
Mirsad Goran Todorovac
31d8d1d43a test_firmware: fix a memory leak with reqs buffer
commit be37bed754ed90b2655382f93f9724b3c1aae847 upstream.

Dan Carpenter spotted that test_fw_config->reqs will be leaked if
trigger_batched_requests_store() is called two or more times.
The same appears with trigger_batched_requests_async_store().

This bug wasn't trigger by the tests, but observed by Dan's visual
inspection of the code.

The recommended workaround was to return -EBUSY if test_fw_config->reqs
is already allocated.

Fixes: 7feebfa487b92 ("test_firmware: add support for request_firmware_into_buf")
Cc: Luis Chamberlain <mcgrof@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Russ Weight <russell.h.weight@intel.com>
Cc: Tianfei Zhang <tianfei.zhang@intel.com>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Colin Ian King <colin.i.king@gmail.com>
Cc: Randy Dunlap <rdunlap@infradead.org>
Cc: linux-kselftest@vger.kernel.org
Cc: stable@vger.kernel.org # v5.4
Suggested-by: Dan Carpenter <error27@gmail.com>
Suggested-by: Takashi Iwai <tiwai@suse.de>
Signed-off-by: Mirsad Goran Todorovac <mirsad.todorovac@alu.unizg.hr>
Reviewed-by: Dan Carpenter <dan.carpenter@linaro.org>
Acked-by: Luis Chamberlain <mcgrof@kernel.org>
Link: https://lore.kernel.org/r/20230509084746.48259-2-mirsad.todorovac@alu.unizg.hr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-11 11:45:39 +02:00
Tetsuo Handa
59e3e1bc61 debugobjects: Recheck debug_objects_enabled before reporting
[ Upstream commit 8b64d420fe2450f82848178506d3e3a0bd195539 ]

syzbot is reporting false a positive ODEBUG message immediately after
ODEBUG was disabled due to OOM.

  [ 1062.309646][T22911] ODEBUG: Out of memory. ODEBUG disabled
  [ 1062.886755][ T5171] ------------[ cut here ]------------
  [ 1062.892770][ T5171] ODEBUG: assert_init not available (active state 0) object: ffffc900056afb20 object type: timer_list hint: process_timeout+0x0/0x40

  CPU 0 [ T5171]                CPU 1 [T22911]
  --------------                --------------
  debug_object_assert_init() {
    if (!debug_objects_enabled)
      return;
    db = get_bucket(addr);
                                lookup_object_or_alloc() {
                                  debug_objects_enabled = 0;
                                  return NULL;
                                }
                                debug_objects_oom() {
                                  pr_warn("Out of memory. ODEBUG disabled\n");
                                  // all buckets get emptied here, and
                                }
    lookup_object_or_alloc(addr, db, descr, false, true) {
      // this bucket is already empty.
      return ERR_PTR(-ENOENT);
    }
    // Emits false positive warning.
    debug_print_object(&o, "assert_init");
  }

Recheck debug_object_enabled in debug_print_object() to avoid that.

Reported-by: syzbot <syzbot+7937ba6a50bdd00fffdf@syzkaller.appspotmail.com>
Suggested-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Tetsuo Handa <penguin-kernel@I-love.SAKURA.ne.jp>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/r/492fe2ae-5141-d548-ebd5-62f5fe2e57f7@I-love.SAKURA.ne.jp
Closes: https://syzkaller.appspot.com/bug?extid=7937ba6a50bdd00fffdf
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-08-11 11:45:24 +02:00
Jeremy Sowden
d624b93ff7 lib/ts_bm: reset initial match offset for every block of text
[ Upstream commit 6f67fbf8192da80c4db01a1800c7fceaca9cf1f9 ]

The `shift` variable which indicates the offset in the string at which
to start matching the pattern is initialized to `bm->patlen - 1`, but it
is not reset when a new block is retrieved.  This means the implemen-
tation may start looking at later and later positions in each successive
block and miss occurrences of the pattern at the beginning.  E.g.,
consider a HTTP packet held in a non-linear skb, where the HTTP request
line occurs in the second block:

  [... 52 bytes of packet headers ...]
  GET /bmtest HTTP/1.1\r\nHost: www.example.com\r\n\r\n

and the pattern is "GET /bmtest".

Once the first block comprising the packet headers has been examined,
`shift` will be pointing to somewhere near the end of the block, and so
when the second block is examined the request line at the beginning will
be missed.

Reinitialize the variable for each new block.

Fixes: 8082e4ed0a ("[LIB]: Boyer-Moore extension for textsearch infrastructure strike #2")
Link: https://bugzilla.netfilter.org/show_bug.cgi?id=1390
Signed-off-by: Jeremy Sowden <jeremy@azazel.net>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-08-11 11:45:07 +02:00
Kees Cook
b7e389235c treewide: Remove uninitialized_var() usage
commit 3f649ab728cda8038259d8f14492fe400fbab911 upstream.

Using uninitialized_var() is dangerous as it papers over real bugs[1]
(or can in the future), and suppresses unrelated compiler warnings
(e.g. "unused variable"). If the compiler thinks it is uninitialized,
either simply initialize the variable or make compiler changes.

In preparation for removing[2] the[3] macro[4], remove all remaining
needless uses with the following script:

git grep '\buninitialized_var\b' | cut -d: -f1 | sort -u | \
	xargs perl -pi -e \
		's/\buninitialized_var\(([^\)]+)\)/\1/g;
		 s:\s*/\* (GCC be quiet|to make compiler happy) \*/$::g;'

drivers/video/fbdev/riva/riva_hw.c was manually tweaked to avoid
pathological white-space.

No outstanding warnings were found building allmodconfig with GCC 9.3.0
for x86_64, i386, arm64, arm, powerpc, powerpc64le, s390x, mips, sparc64,
alpha, and m68k.

[1] https://lore.kernel.org/lkml/20200603174714.192027-1-glider@google.com/
[2] https://lore.kernel.org/lkml/CA+55aFw+Vbj0i=1TGqCR5vQkCzWJ0QxK6CernOU6eedsudAixw@mail.gmail.com/
[3] https://lore.kernel.org/lkml/CA+55aFwgbgqhbp1fkxvRKEpzyR5J8n1vKT1VZdz9knmPuXhOeg@mail.gmail.com/
[4] https://lore.kernel.org/lkml/CA+55aFz2500WfbKXAx8s67wrm9=yVJu65TpLgN_ybYNv0VEOKA@mail.gmail.com/

Reviewed-by: Leon Romanovsky <leonro@mellanox.com> # drivers/infiniband and mlx4/mlx5
Acked-by: Jason Gunthorpe <jgg@mellanox.com> # IB
Acked-by: Kalle Valo <kvalo@codeaurora.org> # wireless drivers
Reviewed-by: Chao Yu <yuchao0@huawei.com> # erofs
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-11 11:45:01 +02:00
Michael Bestas
2c5e7c6143
Merge tag 'ASB-2023-07-05_4.19-stable' of https://android.googlesource.com/kernel/common into android13-4.19-kona
https://source.android.com/docs/security/bulletin/2023-07-01
CVE-2022-42703
CVE-2023-21255
CVE-2023-25012

* tag 'ASB-2023-07-05_4.19-stable' of https://android.googlesource.com/kernel/common:
  Linux 4.19.288
  i2c: imx-lpi2c: fix type char overflow issue when calculating the clock cycle
  x86/apic: Fix kernel panic when booting with intremap=off and x2apic_phys
  drm/radeon: fix race condition UAF in radeon_gem_set_domain_ioctl
  drm/exynos: fix race condition UAF in exynos_g2d_exec_ioctl
  drm/exynos: vidi: fix a wrong error return
  ASoC: nau8824: Add quirk to active-high jack-detect
  s390/cio: unregister device when the only path is gone
  usb: gadget: udc: fix NULL dereference in remove()
  nfcsim.c: Fix error checking for debugfs_create_dir
  media: cec: core: don't set last_initiator if tx in progress
  arm64: Add missing Set/Way CMO encodings
  HID: wacom: Add error check to wacom_parse_and_register()
  scsi: target: iscsi: Prevent login threads from racing between each other
  sch_netem: acquire qdisc lock in netem_change()
  netfilter: nfnetlink_osf: fix module autoload
  netfilter: nf_tables: disallow element updates of bound anonymous sets
  be2net: Extend xmit workaround to BE3 chip
  mmc: usdhi60rol0: fix deferred probing
  mmc: sdhci-acpi: fix deferred probing
  mmc: omap_hsmmc: fix deferred probing
  mmc: omap: fix deferred probing
  mmc: mvsdio: fix deferred probing
  mmc: mvsdio: convert to devm_platform_ioremap_resource
  mmc: mtk-sd: fix deferred probing
  net: qca_spi: Avoid high load if QCA7000 is not available
  xfrm: Linearize the skb after offloading if needed.
  ieee802154: hwsim: Fix possible memory leaks
  rcu: Upgrade rcu_swap_protected() to rcu_replace_pointer()
  nilfs2: prevent general protection fault in nilfs_clear_dirty_page()
  cgroup: Do not corrupt task iteration when rebinding subsystem
  PCI: hv: Fix a race condition bug in hv_pci_query_relations()
  Drivers: hv: vmbus: Fix vmbus_wait_for_unload() to scan present CPUs
  nilfs2: fix buffer corruption due to concurrent device reads
  ipmi: move message error checking to avoid deadlock
  ipmi: Make the smi watcher be disabled immediately when not needed
  x86/purgatory: remove PGO flags
  nilfs2: reject devices with insufficient block count
  serial: lantiq: add missing interrupt ack
  serial: lantiq: Do not swap register read/writes
  serial: lantiq: Use readl/writel instead of ltq_r32/ltq_w32
  serial: lantiq: Change ltq_w32_mask to asc_update_bits
  Linux 4.19.287
  mmc: block: ensure error propagation for non-blk
  powerpc: Fix defconfig choice logic when cross compiling
  drm/nouveau/kms: Fix NULL pointer dereference in nouveau_connector_detect_depth
  neighbour: delete neigh_lookup_nodev as not used
  net: Remove unused inline function dst_hold_and_use()
  neighbour: Remove unused inline function neigh_key_eq16()
  selftests/ptp: Fix timestamp printf format for PTP_SYS_OFFSET
  net: tipc: resize nlattr array to correct size
  net: lapbether: only support ethernet devices
  drm/nouveau: add nv_encoder pointer check for NULL
  drm/nouveau/kms: Don't change EDID when it hasn't actually changed
  drm/nouveau/dp: check for NULL nv_connector->native_mode
  igb: fix nvm.ops.read() error handling
  sctp: fix an error code in sctp_sf_eat_auth()
  IB/isert: Fix incorrect release of isert connection
  IB/isert: Fix possible list corruption in CMA handler
  IB/isert: Fix dead lock in ib_isert
  IB/uverbs: Fix to consider event queue closing also upon non-blocking mode
  RDMA/rxe: Fix the use-before-initialization error of resp_pkts
  RDMA/rxe: Removed unused name from rxe_task struct
  RDMA/rxe: Remove the unused variable obj
  ping6: Fix send to link-local addresses with VRF.
  netfilter: nfnetlink: skip error delivery on batch in case of ENOMEM
  usb: gadget: f_ncm: Fix NTP-32 support
  usb: gadget: f_ncm: Add OS descriptor support
  usb: dwc3: gadget: Reset num TRBs before giving back the request
  USB: serial: option: add Quectel EM061KGL series
  Remove DECnet support from kernel
  net: usb: qmi_wwan: add support for Compal RXM-G1
  RDMA/uverbs: Restrict usage of privileged QKEYs
  nouveau: fix client work fence deletion race
  powerpc/purgatory: remove PGO flags
  kexec: support purgatories with .text.hot sections
  nilfs2: fix possible out-of-bounds segment allocation in resize ioctl
  nilfs2: fix incomplete buffer cleanup in nilfs_btnode_abort_change_key()
  nios2: dts: Fix tse_mac "max-frame-size" property
  ocfs2: check new file size on fallocate call
  ocfs2: fix use-after-free when unmounting read-only filesystem
  xen/blkfront: Only check REQ_FUA for writes
  mips: Move initrd_start check after initrd address sanitisation.
  MIPS: Alchemy: fix dbdma2
  parisc: Improve cache flushing for PCXL in arch_sync_dma_for_cpu()
  power: supply: Fix logic checking if system is running from battery
  irqchip/meson-gpio: Mark OF related data as maybe unused
  regulator: Fix error checking for debugfs_create_dir
  power: supply: Ratelimit no data debug output
  ARM: dts: vexpress: add missing cache properties
  power: supply: bq27xxx: Use mod_delayed_work() instead of cancel() + schedule()
  power: supply: ab8500: Fix external_power_changed race
  Revert "tcp: deny tcp_disconnect() when threads are waiting"
  Revert "tcp: deny tcp_disconnect() when threads are waiting"
  ANDROID: GKI: update ABI xml for incrementalfs.ko
  Linux 4.19.286
  Revert "staging: rtl8192e: Replace macro RTL_PCI_DEVICE with PCI_DEVICE"
  btrfs: unset reloc control if transaction commit fails in prepare_to_relocate()
  btrfs: check return value of btrfs_commit_transaction in relocation
  ext4: only check dquot_initialize_needed() when debugging
  i2c: sprd: Delete i2c adapter in .remove's error path
  pinctrl: meson-axg: add missing GPIOA_18 gpio group
  Bluetooth: Fix use-after-free in hci_remove_ltk/hci_remove_irk
  ceph: fix use-after-free bug for inodes when flushing capsnaps
  drm/amdgpu: fix xclk freq on CHIP_STONEY
  Input: psmouse - fix OOB access in Elantech protocol
  Input: xpad - delete a Razer DeathAdder mouse VID/PID entry
  batman-adv: Broken sync while rescheduling delayed work
  lib: cpu_rmap: Fix potential use-after-free in irq_cpu_rmap_release()
  net: sched: fix possible refcount leak in tc_chain_tmplt_add()
  net: sched: move rtm_tca_policy declaration to include file
  rfs: annotate lockless accesses to RFS sock flow table
  rfs: annotate lockless accesses to sk->sk_rxhash
  Bluetooth: L2CAP: Add missing checks for invalid DCID
  Bluetooth: Fix l2cap_disconnect_req deadlock
  net: dsa: lan9303: allow vid != 0 in port_fdb_{add|del} methods
  spi: qup: Request DMA before enabling clocks
  i40e: fix build warnings in i40e_alloc.h
  i40iw: fix build warning in i40iw_manage_apbvt()
  UPSTREAM: net: cdc_ncm: Deal with too low values of dwNtbOutMaxSize
  UPSTREAM: cdc_ncm: Fix the build warning
  UPSTREAM: cdc_ncm: Implement the 32-bit version of NCM Transfer Block
  Revert "tcp: reduce POLLOUT events caused by TCP_NOTSENT_LOWAT"
  Revert "tcp: return EPOLLOUT from tcp_poll only when notsent_bytes is half the limit"
  Revert "tcp: factor out __tcp_close() helper"
  Revert "tcp: add annotations around sk->sk_shutdown accesses"
  ANDROID: fix abi break in 4.19.284 for cpuhotplug.h
  UPSTREAM: mailbox: mailbox-test: fix a locking issue in mbox_test_message_write()
  UPSTREAM: mailbox: mailbox-test: Fix potential double-free in mbox_test_message_write()
  Linux 4.19.285
  wifi: rtlwifi: 8192de: correct checking of IQK reload
  scsi: dpt_i2o: Do not process completions with invalid addresses
  scsi: dpt_i2o: Remove broken pass-through ioctl (I2OUSERCMD)
  regmap: Account for register length when chunking
  fbcon: Fix null-ptr-deref in soft_cursor
  ext4: add lockdep annotations for i_data_sem for ea_inode's
  selinux: don't use make's grouped targets feature yet
  tty: serial: fsl_lpuart: use UARTCTRL_TXINV to send break instead of UARTCTRL_SBK
  mmc: vub300: fix invalid response handling
  rsi: Remove unnecessary boolean condition
  regulator: da905{2,5}: Remove unnecessary array check
  hwmon: (scmi) Remove redundant pointer check
  wifi: rtlwifi: remove always-true condition pointed out by GCC 12
  lib/dynamic_debug.c: use address-of operator on section symbols
  kernel/extable.c: use address-of operator on section symbols
  eth: sun: cassini: remove dead code
  gcc-12: disable '-Wdangling-pointer' warning for now
  ACPI: thermal: drop an always true check
  x86/boot: Wrap literal addresses in absolute_pointer()
  ata: libata-scsi: Use correct device no in ata_find_dev()
  scsi: stex: Fix gcc 13 warnings
  usb: gadget: f_fs: Add unbind event before functionfs_unbind
  net: usb: qmi_wwan: Set DTR quirk for BroadMobi BM818
  iio: dac: build ad5758 driver when AD5758 is selected
  iio: dac: mcp4725: Fix i2c_master_send() return value handling
  HID: wacom: avoid integer overflow in wacom_intuos_inout()
  HID: google: add jewel USB id
  iio: adc: mxs-lradc: fix the order of two cleanup operations
  mailbox: mailbox-test: fix a locking issue in mbox_test_message_write()
  atm: hide unused procfs functions
  ALSA: oss: avoid missing-prototype warnings
  netfilter: conntrack: define variables exp_nat_nla_policy and any_addr with CONFIG_NF_NAT
  wifi: b43: fix incorrect __packed annotation
  scsi: core: Decrease scsi_device's iorequest_cnt if dispatch failed
  arm64/mm: mark private VM_FAULT_X defines as vm_fault_t
  ARM: dts: stm32: add pin map for CAN controller on stm32f7
  wifi: rtl8xxxu: fix authentication timeout due to incorrect RCR value
  media: dvb-core: Fix use-after-free due to race condition at dvb_ca_en50221
  media: dvb-core: Fix kernel WARNING for blocking operation in wait_event*()
  media: dvb-core: Fix use-after-free due on race condition at dvb_net
  media: mn88443x: fix !CONFIG_OF error by drop of_match_ptr from ID table
  media: ttusb-dec: fix memory leak in ttusb_dec_exit_dvb()
  media: dvb_ca_en50221: fix a size write bug
  media: netup_unidvb: fix irq init by register it at the end of probe
  media: dvb-usb: dw2102: fix uninit-value in su3000_read_mac_address
  media: dvb-usb: digitv: fix null-ptr-deref in digitv_i2c_xfer()
  media: dvb-usb-v2: rtl28xxu: fix null-ptr-deref in rtl28xxu_i2c_xfer
  media: dvb-usb-v2: ce6230: fix null-ptr-deref in ce6230_i2c_master_xfer()
  media: dvb-usb-v2: ec168: fix null-ptr-deref in ec168_i2c_xfer()
  media: dvb-usb: az6027: fix three null-ptr-deref in az6027_i2c_xfer()
  media: dvb_demux: fix a bug for the continuity counter
  ASoC: ssm2602: Add workaround for playback distortions
  xfrm: Check if_id in inbound policy/secpath match
  ASoC: dwc: limit the number of overrun messages
  nbd: Fix debugfs_create_dir error checking
  fbdev: stifb: Fix info entry in sti_struct on error path
  fbdev: modedb: Add 1920x1080 at 60 Hz video mode
  media: rcar-vin: Select correct interrupt mode for V4L2_FIELD_ALTERNATE
  ARM: 9295/1: unwind:fix unwind abort for uleb128 case
  mailbox: mailbox-test: Fix potential double-free in mbox_test_message_write()
  watchdog: menz069_wdt: fix watchdog initialisation
  net: dsa: mv88e6xxx: Increase wait after reset deactivation
  net/sched: flower: fix possible OOB write in fl_set_geneve_opt()
  udp6: Fix race condition in udp6_sendmsg & connect
  net/netlink: fix NETLINK_LIST_MEMBERSHIPS length report
  ocfs2/dlm: move BITS_TO_BYTES() to bitops.h for wider use
  net: sched: fix NULL pointer dereference in mq_attach
  net/sched: Prohibit regrafting ingress or clsact Qdiscs
  net/sched: Reserve TC_H_INGRESS (TC_H_CLSACT) for ingress (clsact) Qdiscs
  net/sched: sch_clsact: Only create under TC_H_CLSACT
  net/sched: sch_ingress: Only create under TC_H_INGRESS
  tcp: Return user_mss for TCP_MAXSEG in CLOSE/LISTEN state if user_mss set
  tcp: deny tcp_disconnect() when threads are waiting
  af_packet: do not use READ_ONCE() in packet_bind()
  amd-xgbe: fix the false linkup in xgbe_phy_status
  af_packet: Fix data-races of pkt_sk(sk)->num.
  netrom: fix info-leak in nr_write_internal()
  net/mlx5: fw_tracer, Fix event handling
  dmaengine: pl330: rename _start to prevent build error
  netfilter: ctnetlink: Support offloaded conntrack entry deletion
  ipv{4,6}/raw: fix output xfrm lookup wrt protocol
  bluetooth: Add cmd validity checks at the start of hci_sock_ioctl()
  cdc_ncm: Fix the build warning
  power: supply: bq24190: Call power_supply_changed() after updating input current
  power: supply: core: Refactor power_supply_set_input_current_limit_from_supplier()
  power: supply: bq27xxx: After charger plug in/out wait 0.5s for things to stabilize
  net: cdc_ncm: Deal with too low values of dwNtbOutMaxSize
  cdc_ncm: Implement the 32-bit version of NCM Transfer Block
  UPSTREAM: efi: rt-wrapper: Add missing include
  BACKPORT: arm64: efi: Execute runtime services from a dedicated stack
  Revert "uapi/linux/const.h: prefer ISO-friendly __typeof__"
  Linux 4.19.284
  drivers: depend on HAS_IOMEM for devm_platform_ioremap_resource()
  3c589_cs: Fix an error handling path in tc589_probe()
  forcedeth: Fix an error handling path in nv_probe()
  ASoC: Intel: Skylake: Fix declaration of enum skl_ch_cfg
  x86/show_trace_log_lvl: Ensure stack pointer is aligned, again
  xen/pvcalls-back: fix double frees with pvcalls_new_active_socket()
  coresight: Fix signedness bug in tmc_etr_buf_insert_barrier_packet()
  power: supply: sbs-charger: Fix INHIBITED bit for Status reg
  power: supply: bq27xxx: Fix poll_interval handling and races on remove
  power: supply: bq27xxx: Fix I2C IRQ race on remove
  power: supply: bq27xxx: Fix bq27xxx_battery_update() race condition
  power: supply: leds: Fix blink to LED on transition
  ipv6: Fix out-of-bounds access in ipv6_find_tlv()
  bpf: Fix mask generation for 32-bit narrow loads of 64-bit fields
  net: fix skb leak in __skb_tstamp_tx()
  media: radio-shark: Add endpoint checks
  USB: sisusbvga: Add endpoint checks
  USB: core: Add routines for endpoint checks in old drivers
  udplite: Fix NULL pointer dereference in __sk_mem_raise_allocated().
  ALSA: hda/realtek - Fix inverted bass GPIO pin on Acer 8951G
  ALSA: hda/realtek - Fixed one of HP ALC671 platform Headset Mic supported
  parisc: Fix flush_dcache_page() for usage from irq context
  selftests/memfd: Fix unknown type name build failure
  x86/mm: Avoid incomplete Global INVLPG flushes
  btrfs: use nofs when cleaning up aborted transactions
  parisc: Allow to reboot machine after system halt
  m68k: Move signal frame following exception on 68020/030
  ALSA: hda/ca0132: add quirk for EVGA X299 DARK
  spi: fsl-cpm: Use 16 bit mode for large transfers with even size
  spi: fsl-spi: Re-organise transfer bits_per_word adaptation
  spi: spi-fsl-spi: automatically adapt bits-per-word in cpu mode
  s390/qdio: fix do_sqbs() inline assembly constraint
  s390/qdio: get rid of register asm
  vc_screen: reload load of struct vc_data pointer in vcs_write() to avoid UAF
  vc_screen: rewrite vcs_size to accept vc, not inode
  usb: gadget: u_ether: Fix host MAC address case
  usb: gadget: u_ether: Convert prints to device prints
  lib/string_helpers: Introduce string_upper() and string_lower() helpers
  ALSA: hda/realtek: Add a quirk for HP EliteDesk 805
  ALSA: hda/realtek - ALC897 headset MIC no sound
  ALSA: hda/realtek - Add headset Mic support for Lenovo ALC897 platform
  ALSA: hda/realtek: Fix the mic type detection issue for ASUS G551JW
  ALSA: hda/realtek - The front Mic on a HP machine doesn't work
  ALSA: hda/realtek - Enable the headset of Acer N50-600 with ALC662
  ALSA: hda/realtek - Enable headset mic of Acer X2660G with ALC662
  ALSA: hda/realtek - Add Headset Mic supported for HP cPC
  ALSA: hda/realtek - More constifications
  Add Acer Aspire Ethos 8951G model quirk
  HID: wacom: Force pen out of prox if no events have been received in a while
  netfilter: nf_tables: do not allow RULE_ID to refer to another chain
  netfilter: nf_tables: validate NFTA_SET_ELEM_OBJREF based on NFT_SET_OBJECT flag
  netfilter: nf_tables: stricter validation of element data
  netfilter: nf_tables: allow up to 64 bytes in the set element data area
  netfilter: nf_tables: add nft_setelem_parse_key()
  netfilter: nf_tables: validate registers coming from userspace.
  netfilter: nftables: statify nft_parse_register()
  netfilter: nftables: add nft_parse_register_store() and use it
  netfilter: nftables: add nft_parse_register_load() and use it
  nilfs2: fix use-after-free bug of nilfs_root in nilfs_evict_inode()
  tpm/tpm_tis: Disable interrupts for more Lenovo devices
  ceph: force updating the msg pointer in non-split case
  serial: Add support for Advantech PCI-1611U card
  statfs: enforce statfs[64] structure initialization
  ALSA: hda: Add NVIDIA codec IDs a3 through a7 to patch table
  ALSA: hda: Fix Oops by 9.1 surround channel names
  usb: typec: altmodes/displayport: fix pin_assignment_show
  usb-storage: fix deadlock when a scsi command timeouts more than once
  vlan: fix a potential uninit-value in vlan_dev_hard_start_xmit()
  igb: fix bit_shift to be in [1..8] range
  cassini: Fix a memory leak in the error handling path of cas_init_one()
  net: bcmgenet: Restore phy_stop() depending upon suspend/close
  net: bcmgenet: Remove phy_stop() from bcmgenet_netif_stop()
  net: nsh: Use correct mac_offset to unwind gso skb in nsh_gso_segment()
  drm/exynos: fix g2d_open/close helper function definitions
  media: netup_unidvb: fix use-after-free at del_timer()
  erspan: get the proto with the md version for collect_md
  ip_gre, ip6_gre: Fix race condition on o_seqno in collect_md mode
  ip6_gre: Make o_seqno start from 0 in native mode
  ip6_gre: Fix skb_under_panic in __gre6_xmit()
  serial: arc_uart: fix of_iomap leak in `arc_serial_probe`
  drivers: provide devm_platform_ioremap_resource()
  vsock: avoid to close connected socket after the timeout
  net: fec: Better handle pm_runtime_get() failing in .remove()
  af_key: Reject optional tunnel/BEET mode templates in outbound policies
  cpupower: Make TSC read per CPU for Mperf monitor
  btrfs: fix space cache inconsistency after error loading it from disk
  btrfs: replace calls to btrfs_find_free_ino with btrfs_find_free_objectid
  mfd: dln2: Fix memory leak in dln2_probe()
  phy: st: miphy28lp: use _poll_timeout functions for waits
  Input: xpad - add constants for GIP interface numbers
  clk: tegra20: fix gcc-7 constant overflow warning
  recordmcount: Fix memory leaks in the uwrite function
  sched: Fix KCSAN noinstr violation
  mcb-pci: Reallocate memory region to avoid memory overlapping
  serial: 8250: Reinit port->pm on port specific driver unbind
  usb: typec: tcpm: fix multiple times discover svids error
  HID: wacom: generic: Set battery quirk only when we see battery data
  spi: spi-imx: fix MX51_ECSPI_* macros when cs > 3
  HID: logitech-hidpp: Reconcile USB and Unifying serials
  HID: logitech-hidpp: Don't use the USB serial for USB devices
  staging: rtl8192e: Replace macro RTL_PCI_DEVICE with PCI_DEVICE
  Bluetooth: L2CAP: fix "bad unlock balance" in l2cap_disconnect_rsp
  wifi: iwlwifi: dvm: Fix memcpy: detected field-spanning write backtrace
  f2fs: fix to drop all dirty pages during umount() if cp_error is set
  ext4: Fix best extent lstart adjustment logic in ext4_mb_new_inode_pa()
  ext4: set goal start correctly in ext4_mb_normalize_request
  gfs2: Fix inode height consistency check
  scsi: message: mptlan: Fix use after free bug in mptlan_remove() due to race condition
  lib: cpu_rmap: Avoid use after free on rmap->obj array entries
  net: Catch invalid index in XPS mapping
  net: pasemi: Fix return type of pasemi_mac_start_tx()
  ext2: Check block size validity during mount
  wifi: brcmfmac: cfg80211: Pass the PMK in binary instead of hex
  ACPICA: ACPICA: check null return of ACPI_ALLOCATE_ZEROED in acpi_db_display_objects
  ACPICA: Avoid undefined behavior: applying zero offset to null pointer
  drm/tegra: Avoid potential 32-bit integer overflow
  ACPI: EC: Fix oops when removing custom query handlers
  firmware: arm_sdei: Fix sleep from invalid context BUG
  memstick: r592: Fix UAF bug in r592_remove due to race condition
  regmap: cache: Return error in cache sync operations for REGCACHE_NONE
  drm/amd/display: Use DC_LOG_DC in the trasform pixel function
  fs: hfsplus: remove WARN_ON() from hfsplus_cat_{read,write}_inode()
  af_unix: Fix data races around sk->sk_shutdown.
  af_unix: Fix a data race of sk->sk_receive_queue->qlen.
  net: datagram: fix data-races in datagram_poll()
  ipvlan:Fix out-of-bounds caused by unclear skb->cb
  tcp: add annotations around sk->sk_shutdown accesses
  tcp: factor out __tcp_close() helper
  tcp: return EPOLLOUT from tcp_poll only when notsent_bytes is half the limit
  tcp: reduce POLLOUT events caused by TCP_NOTSENT_LOWAT
  net: annotate sk->sk_err write from do_recvmmsg()
  netlink: annotate accesses to nlk->cb_running
  net: Fix load-tearing on sk->sk_stamp in sock_recv_cmsgs().
  Linux 4.19.283
  mm/page_alloc: fix potential deadlock on zonelist_update_seq seqlock
  printk: declare printk_deferred_{enter,safe}() in include/linux/printk.h
  PCI: pciehp: Fix AB-BA deadlock between reset_lock and device_lock
  PCI: pciehp: Use down_read/write_nested(reset_lock) to fix lockdep errors
  drbd: correctly submit flush bio on barrier
  serial: 8250: Fix serial8250_tx_empty() race with DMA Tx
  tty: Prevent writing chars during tcsetattr TCSADRAIN/FLUSH
  ext4: fix invalid free tracking in ext4_xattr_move_to_block()
  ext4: remove a BUG_ON in ext4_mb_release_group_pa()
  ext4: bail out of ext4_xattr_ibody_get() fails for any reason
  ext4: add bounds checking in get_max_inline_xattr_value_size()
  ext4: improve error recovery code paths in __ext4_remount()
  ext4: avoid a potential slab-out-of-bounds in ext4_group_desc_csum
  ext4: fix WARNING in mb_find_extent
  HID: wacom: Set a default resolution for older tablets
  drm/panel: otm8009a: Set backlight parent to panel device
  ARM: dts: s5pv210: correct MIPI CSIS clock name
  ARM: dts: exynos: fix WM8960 clock name in Itop Elite
  sh: nmi_debug: fix return value of __setup handler
  sh: init: use OF_EARLY_FLATTREE for early init
  sh: math-emu: fix macro redefined warning
  platform/x86: touchscreen_dmi: Add info for the Dexp Ursus KX210i
  cifs: fix pcchunk length type in smb2_copychunk_range
  btrfs: print-tree: parent bytenr must be aligned to sector size
  btrfs: fix btrfs_prev_leaf() to not return the same key twice
  perf symbols: Fix return incorrect build_id size in elf_read_build_id()
  perf map: Delete two variable initialisations before null pointer checks in sort__sym_from_cmp()
  perf vendor events power9: Remove UTF-8 characters from JSON files
  virtio_net: suppress cpu stall when free_unused_bufs
  virtio_net: split free_unused_bufs()
  ALSA: caiaq: input: Add error handling for unsupported input methods in `snd_usb_caiaq_input_init`
  drm/amdgpu: add a missing lock for AMDGPU_SCHED
  drm/amdgpu: Add command to override the context priority.
  drm/amdgpu: Put enable gfx off feature to a delay thread
  drm/amdgpu: Add amdgpu_gfx_off_ctrl function
  af_packet: Don't send zero-byte data in packet_sendmsg_spkt().
  rxrpc: Fix hard call timeout units
  net/sched: act_mirred: Add carrier check
  writeback: fix call of incorrect macro
  net: dsa: mv88e6xxx: add mv88e6321 rsvd2cpu
  net: dsa: mv88e6xxx: Add missing watchdog ops for 6320 family
  sit: update dev->needed_headroom in ipip6_tunnel_bind_dev()
  relayfs: fix out-of-bounds access in relay_file_read
  kernel/relay.c: fix read_pos error when multiple readers
  dm verity: fix error handling for check_at_most_once on FEC
  dm verity: skip redundant verity_handle_err() on I/O errors
  ipmi: fix SSIF not responding under certain cond.
  ipmi_ssif: Rename idle state and check
  ipmi: Fix how the lower layers are told to watch for messages
  ipmi: Fix SSIF flag requests
  tick/nohz: Fix cpu_is_hotpluggable() by checking with nohz subsystem
  nohz: Add TICK_DEP_BIT_RCU
  netfilter: nf_tables: deactivate anonymous set from preparation phase
  debugobject: Ensure pool refill (again)
  perf auxtrace: Fix address filter entire kernel size
  dm ioctl: fix nested locking in table_clear() to remove deadlock concern
  dm flakey: fix a crash with invalid table line
  dm integrity: call kmem_cache_destroy() in dm_integrity_init() error path
  s390/dasd: fix hanging blockdevice after request requeue
  btrfs: scrub: reject unsupported scrub flags
  clk: rockchip: rk3399: allow clk_cifout to force clk_cifout_src to reparent
  wifi: rtl8xxxu: RTL8192EU always needs full init
  md/raid10: fix null-ptr-deref in raid10_sync_request
  nilfs2: fix infinite loop in nilfs_mdt_get_block()
  nilfs2: do not write dirty data after degenerating to read-only
  parisc: Fix argument pointer in real64_call_asm()
  dmaengine: at_xdmac: do not enable all cyclic channels
  phy: tegra: xusb: Add missing tegra_xusb_port_unregister for usb2_port and ulpi_port
  pwm: mtk-disp: Disable shadow registers before setting backlight values
  pwm: mtk-disp: Adjust the clocks to avoid them mismatch
  pwm: mtk-disp: Don't check the return code of pwmchip_remove()
  openrisc: Properly store r31 to pt_regs on unhandled exceptions
  RDMA/mlx5: Use correct device num_ports when modify DC
  SUNRPC: remove the maximum number of retries in call_bind_status
  NFSv4.1: Always send a RECLAIM_COMPLETE after establishing lease
  IB/hfi1: Fix SDMA mmu_rb_node not being evicted in LRU order
  clk: add missing of_node_put() in "assigned-clocks" property parsing
  power: supply: generic-adc-battery: fix unit scaling
  RDMA/mlx4: Prevent shift wrapping in set_user_sq_size()
  RDMA/rdmavt: Delete unnecessary NULL check
  perf/core: Fix hardlockup failure caused by perf throttle
  powerpc/rtas: use memmove for potentially overlapping buffer copy
  macintosh: via-pmu-led: requires ATA to be set
  powerpc/sysdev/tsi108: fix resource printk format warnings
  powerpc/wii: fix resource printk format warnings
  powerpc/mpc512x: fix resource printk format warning
  macintosh/windfarm_smu_sat: Add missing of_node_put()
  spmi: Add a check for remove callback when removing a SPMI driver
  staging: rtl8192e: Fix W_DISABLE# does not work after stop/start
  serial: 8250: Add missing wakeup event reporting
  tty: serial: fsl_lpuart: adjust buffer length to the intended size
  usb: chipidea: fix missing goto in `ci_hdrc_probe`
  sh: sq: Fix incorrect element size for allocating bitmap buffer
  uapi/linux/const.h: prefer ISO-friendly __typeof__
  spi: cadence-quadspi: fix suspend-resume implementations
  mtd: spi-nor: cadence-quadspi: Handle probe deferral while requesting DMA channel
  mtd: spi-nor: cadence-quadspi: Don't initialize rx_dma_complete on failure
  mtd: spi-nor: cadence-quadspi: Make driver independent of flash geometry
  ia64: salinfo: placate defined-but-not-used warning
  ia64: mm/contig: fix section mismatch warning/error
  of: Fix modalias string generation
  vmci_host: fix a race condition in vmci_host_poll() causing GPF
  spi: fsl-spi: Fix CPM/QE mode Litte Endian
  spi: qup: Don't skip cleanup in remove's error path
  spi: qup: fix PM reference leak in spi_qup_remove()
  linux/vt_buffer.h: allow either builtin or modular for macros
  usb: gadget: udc: renesas_usb3: Fix use after free bug in renesas_usb3_remove due to race condition
  fpga: bridge: fix kernel-doc parameter description
  usb: host: xhci-rcar: remove leftover quirk handling
  pstore: Revert pmsg_lock back to a normal mutex
  tcp/udp: Fix memleaks of sk and zerocopy skbs with TX timestamp.
  net: amd: Fix link leak when verifying config failed
  netlink: Use copy_to_user() for optval in netlink_getsockopt().
  Revert "Bluetooth: btsdio: fix use after free bug in btsdio_remove due to unfinished work"
  ipv4: Fix potential uninit variable access bug in __ip_make_skb()
  netfilter: nf_tables: don't write table validation state without mutex
  ixgbe: Enable setting RSS table to default values
  ixgbe: Allow flow hash to be set via ethtool
  wifi: iwlwifi: mvm: check firmware response size
  wifi: iwlwifi: make the loop for card preparation effective
  md/raid10: fix memleak of md thread
  md: update the optimal I/O size on reshape
  md/raid10: fix memleak for 'conf->bio_split'
  md/raid10: fix leak of 'r10bio->remaining' for recovery
  crypto: drbg - Only fail when jent is unavailable in FIPS mode
  crypto: drbg - make drbg_prepare_hrng() handle jent instantiation errors
  bpftool: Fix bug for long instructions in program CFG dumps
  wifi: rtlwifi: fix incorrect error codes in rtl_debugfs_set_write_reg()
  wifi: rtlwifi: fix incorrect error codes in rtl_debugfs_set_write_rfreg()
  rtlwifi: Replace RT_TRACE with rtl_dbg
  rtlwifi: Start changing RT_TRACE into rtl_dbg
  rtlwifi: rtl_pci: Fix memory leak when hardware init fails
  scsi: megaraid: Fix mega_cmd_done() CMDID_INT_CMDS
  scsi: target: iscsit: Fix TAS handling during conn cleanup
  net/packet: convert po->auxdata to an atomic flag
  net/packet: convert po->origdev to an atomic flag
  vlan: partially enable SIOCSHWTSTAMP in container
  scm: fix MSG_CTRUNC setting condition for SO_PASSSEC
  tools: bpftool: Remove invalid \' json escape
  wifi: ath6kl: reduce WARN to dev_dbg() in callback
  wifi: ath5k: fix an off by one check in ath5k_eeprom_read_freq_list()
  wifi: ath9k: hif_usb: fix memory leak of remain_skbs
  wifi: ath6kl: minor fix for allocation size
  debugobject: Prevent init race with static objects
  debugobjects: Move printk out of db->lock critical sections
  debugobjects: Add percpu free pools
  arm64: kgdb: Set PSTATE.SS to 1 to re-enable single-step
  x86/ioapic: Don't return 0 from arch_dynirq_lower_bound()
  media: rc: gpio-ir-recv: Fix support for wake-up
  media: rcar_fdp1: Fix refcount leak in probe and remove function
  media: rcar_fdp1: Fix the correct variable assignments
  media: saa7134: fix use after free bug in saa7134_finidev due to race condition
  media: dm1105: Fix use after free bug in dm1105_remove due to race condition
  x86/apic: Fix atomic update of offset in reserve_eilvt_offset()
  drm/msm/adreno: drop bogus pm_runtime_set_active()
  drm/msm/adreno: Defer enabling runpm until hw_init()
  firmware: qcom_scm: Clear download bit during reboot
  media: av7110: prevent underflow in write_ts_to_decoder()
  media: uapi: add MEDIA_BUS_FMT_METADATA_FIXED media bus format.
  media: bdisp: Add missing check for create_workqueue
  ARM: dts: qcom: ipq4019: Fix the PCI I/O port range
  EDAC/skx: Fix overflows on the DRAM row address mapping arrays
  EDAC, skx: Move debugfs node under EDAC's hierarchy
  drm/probe-helper: Cancel previous job before starting new one
  drm/vgem: add missing mutex_destroy
  drm/rockchip: Drop unbalanced obj unref
  selinux: ensure av_permissions.h is built when needed
  selinux: fix Makefile dependencies of flask.h
  ubifs: Free memory for tmpfile name
  ubi: Fix return value overwrite issue in try_write_vid_and_data()
  ubifs: Fix memleak when insert_old_idx() failed
  Revert "ubifs: dirty_cow_znode: Fix memleak in error handling path"
  i2c: omap: Fix standard mode false ACK readings
  KVM: nVMX: Emulate NOPs in L2, and PAUSE if it's not intercepted
  reiserfs: Add security prefix to xattr name in reiserfs_security_write()
  ring-buffer: Sync IRQ works before buffer destruction
  pwm: meson: Fix axg ao mux parents
  MIPS: fw: Allow firmware to pass a empty env
  xhci: fix debugfs register accesses while suspended
  debugfs: regset32: Add Runtime PM support
  staging: iio: resolver: ads1210: fix config mode
  perf sched: Cast PTHREAD_STACK_MIN to int as it may turn into sysconf(__SC_THREAD_STACK_MIN_VALUE)
  USB: dwc3: fix runtime pm imbalance on unbind
  stmmac: debugfs entry name is not be changed when udev rename device name.
  ASoC: Intel: bytcr_rt5640: Add quirk for the Acer Iconia One 7 B1-750
  iio: adc: palmas_gpadc: fix NULL dereference on rmmod
  USB: serial: option: add UNISOC vendor and TOZED LT70C product
  bluetooth: Perform careful capability checks in hci_sock_ioctl()
  wifi: brcmfmac: slab-out-of-bounds read in brcmf_get_assoc_ies()

 Conflicts:
	drivers/media/dvb-core/dvb_demux.c
	drivers/usb/dwc3/core.c
	drivers/usb/gadget/function/f_fs.c
	drivers/usb/gadget/function/f_ncm.c
	include/net/pkt_sched.h

Change-Id: I5081b8f3529f4df573736bf7d69201f777754b74
2023-07-11 15:03:00 +03:00
Greg Kroah-Hartman
ab7a9cec28 Merge 4.19.286 into android-4.19-stable
Changes in 4.19.286
	i40iw: fix build warning in i40iw_manage_apbvt()
	i40e: fix build warnings in i40e_alloc.h
	spi: qup: Request DMA before enabling clocks
	net: dsa: lan9303: allow vid != 0 in port_fdb_{add|del} methods
	Bluetooth: Fix l2cap_disconnect_req deadlock
	Bluetooth: L2CAP: Add missing checks for invalid DCID
	rfs: annotate lockless accesses to sk->sk_rxhash
	rfs: annotate lockless accesses to RFS sock flow table
	net: sched: move rtm_tca_policy declaration to include file
	net: sched: fix possible refcount leak in tc_chain_tmplt_add()
	lib: cpu_rmap: Fix potential use-after-free in irq_cpu_rmap_release()
	batman-adv: Broken sync while rescheduling delayed work
	Input: xpad - delete a Razer DeathAdder mouse VID/PID entry
	Input: psmouse - fix OOB access in Elantech protocol
	drm/amdgpu: fix xclk freq on CHIP_STONEY
	ceph: fix use-after-free bug for inodes when flushing capsnaps
	Bluetooth: Fix use-after-free in hci_remove_ltk/hci_remove_irk
	pinctrl: meson-axg: add missing GPIOA_18 gpio group
	i2c: sprd: Delete i2c adapter in .remove's error path
	ext4: only check dquot_initialize_needed() when debugging
	btrfs: check return value of btrfs_commit_transaction in relocation
	btrfs: unset reloc control if transaction commit fails in prepare_to_relocate()
	Revert "staging: rtl8192e: Replace macro RTL_PCI_DEVICE with PCI_DEVICE"
	Linux 4.19.286

Change-Id: I2627fa6bd723195bfebcca7718702e8f42150467
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-06-16 11:55:00 +00:00
Greg Kroah-Hartman
0ec5f56913 This is the 4.19.285 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmSC4oQACgkQONu9yGCS
 aT4vEhAAjCSfwOvhVr1TG8BBldeXOzPBCsmzNTXMfSmd1YzeApZINmDl+pgMLWZO
 ag9C8gdsfre3rihcmuAPdHUJt8+yYP3T8jPKq1sLii5DUHkWXK3FzwAuSe00v/nQ
 053uXMWhtwOzHa7oQFN5yGGiL8mgI0Si6wSfPM8FCiaNJEa3AuRNOL2Y5sw8k+jy
 Pe6xl/P3hBKW2FLGKPK2OnMt96WY1ylbwV1SQlSZzV1pXN8vL4HKSvftt4JqESIQ
 Jj8doEUzBRAi5f1r44+2F7RTHbxVcyphP4BJK1jd5yxpyeYTUVL4PeH8X01TTMc8
 CJqbOmuPGeT7mVtieDwZcOnOuinfvsgcLHI6I4f+xyvfD3VlHKCNz7RUDyGmfsyO
 HQFICH3+7BeX19vp98ybIno7B/2DfqB/sIhqgytn2mbspSEinrNCQJmx8xw4++wg
 ByEvUtS+M+PVERPn+zJipeX8/lksbx0rzyFY55WlkKka5oH148TV4uz459beW5WN
 zDczXdOmWIgq24XpAA0eTu6prcUGG2oea605mCiKM/B7TBWSYMtjH04bHDp8QLkr
 yi6yT0S30pVkPBf3JWOiCNHRlcXbuf/60l9oCExlWnfhkieOs//XF085ZRmuLQi0
 pjW6oc92JeRbubSsDRRPUAwAPBHMRKKhiCs7a3QObMInbqkMWVs=
 =W8Lw
 -----END PGP SIGNATURE-----

Merge 4.19.285 into android-4.19-stable

Changes in 4.19.285
	cdc_ncm: Implement the 32-bit version of NCM Transfer Block
	net: cdc_ncm: Deal with too low values of dwNtbOutMaxSize
	power: supply: bq27xxx: After charger plug in/out wait 0.5s for things to stabilize
	power: supply: core: Refactor power_supply_set_input_current_limit_from_supplier()
	power: supply: bq24190: Call power_supply_changed() after updating input current
	cdc_ncm: Fix the build warning
	bluetooth: Add cmd validity checks at the start of hci_sock_ioctl()
	ipv{4,6}/raw: fix output xfrm lookup wrt protocol
	netfilter: ctnetlink: Support offloaded conntrack entry deletion
	dmaengine: pl330: rename _start to prevent build error
	net/mlx5: fw_tracer, Fix event handling
	netrom: fix info-leak in nr_write_internal()
	af_packet: Fix data-races of pkt_sk(sk)->num.
	amd-xgbe: fix the false linkup in xgbe_phy_status
	af_packet: do not use READ_ONCE() in packet_bind()
	tcp: deny tcp_disconnect() when threads are waiting
	tcp: Return user_mss for TCP_MAXSEG in CLOSE/LISTEN state if user_mss set
	net/sched: sch_ingress: Only create under TC_H_INGRESS
	net/sched: sch_clsact: Only create under TC_H_CLSACT
	net/sched: Reserve TC_H_INGRESS (TC_H_CLSACT) for ingress (clsact) Qdiscs
	net/sched: Prohibit regrafting ingress or clsact Qdiscs
	net: sched: fix NULL pointer dereference in mq_attach
	ocfs2/dlm: move BITS_TO_BYTES() to bitops.h for wider use
	net/netlink: fix NETLINK_LIST_MEMBERSHIPS length report
	udp6: Fix race condition in udp6_sendmsg & connect
	net/sched: flower: fix possible OOB write in fl_set_geneve_opt()
	net: dsa: mv88e6xxx: Increase wait after reset deactivation
	watchdog: menz069_wdt: fix watchdog initialisation
	mailbox: mailbox-test: Fix potential double-free in mbox_test_message_write()
	ARM: 9295/1: unwind:fix unwind abort for uleb128 case
	media: rcar-vin: Select correct interrupt mode for V4L2_FIELD_ALTERNATE
	fbdev: modedb: Add 1920x1080 at 60 Hz video mode
	fbdev: stifb: Fix info entry in sti_struct on error path
	nbd: Fix debugfs_create_dir error checking
	ASoC: dwc: limit the number of overrun messages
	xfrm: Check if_id in inbound policy/secpath match
	ASoC: ssm2602: Add workaround for playback distortions
	media: dvb_demux: fix a bug for the continuity counter
	media: dvb-usb: az6027: fix three null-ptr-deref in az6027_i2c_xfer()
	media: dvb-usb-v2: ec168: fix null-ptr-deref in ec168_i2c_xfer()
	media: dvb-usb-v2: ce6230: fix null-ptr-deref in ce6230_i2c_master_xfer()
	media: dvb-usb-v2: rtl28xxu: fix null-ptr-deref in rtl28xxu_i2c_xfer
	media: dvb-usb: digitv: fix null-ptr-deref in digitv_i2c_xfer()
	media: dvb-usb: dw2102: fix uninit-value in su3000_read_mac_address
	media: netup_unidvb: fix irq init by register it at the end of probe
	media: dvb_ca_en50221: fix a size write bug
	media: ttusb-dec: fix memory leak in ttusb_dec_exit_dvb()
	media: mn88443x: fix !CONFIG_OF error by drop of_match_ptr from ID table
	media: dvb-core: Fix use-after-free due on race condition at dvb_net
	media: dvb-core: Fix kernel WARNING for blocking operation in wait_event*()
	media: dvb-core: Fix use-after-free due to race condition at dvb_ca_en50221
	wifi: rtl8xxxu: fix authentication timeout due to incorrect RCR value
	ARM: dts: stm32: add pin map for CAN controller on stm32f7
	arm64/mm: mark private VM_FAULT_X defines as vm_fault_t
	scsi: core: Decrease scsi_device's iorequest_cnt if dispatch failed
	wifi: b43: fix incorrect __packed annotation
	netfilter: conntrack: define variables exp_nat_nla_policy and any_addr with CONFIG_NF_NAT
	ALSA: oss: avoid missing-prototype warnings
	atm: hide unused procfs functions
	mailbox: mailbox-test: fix a locking issue in mbox_test_message_write()
	iio: adc: mxs-lradc: fix the order of two cleanup operations
	HID: google: add jewel USB id
	HID: wacom: avoid integer overflow in wacom_intuos_inout()
	iio: dac: mcp4725: Fix i2c_master_send() return value handling
	iio: dac: build ad5758 driver when AD5758 is selected
	net: usb: qmi_wwan: Set DTR quirk for BroadMobi BM818
	usb: gadget: f_fs: Add unbind event before functionfs_unbind
	scsi: stex: Fix gcc 13 warnings
	ata: libata-scsi: Use correct device no in ata_find_dev()
	x86/boot: Wrap literal addresses in absolute_pointer()
	ACPI: thermal: drop an always true check
	gcc-12: disable '-Wdangling-pointer' warning for now
	eth: sun: cassini: remove dead code
	kernel/extable.c: use address-of operator on section symbols
	lib/dynamic_debug.c: use address-of operator on section symbols
	wifi: rtlwifi: remove always-true condition pointed out by GCC 12
	hwmon: (scmi) Remove redundant pointer check
	regulator: da905{2,5}: Remove unnecessary array check
	rsi: Remove unnecessary boolean condition
	mmc: vub300: fix invalid response handling
	tty: serial: fsl_lpuart: use UARTCTRL_TXINV to send break instead of UARTCTRL_SBK
	selinux: don't use make's grouped targets feature yet
	ext4: add lockdep annotations for i_data_sem for ea_inode's
	fbcon: Fix null-ptr-deref in soft_cursor
	regmap: Account for register length when chunking
	scsi: dpt_i2o: Remove broken pass-through ioctl (I2OUSERCMD)
	scsi: dpt_i2o: Do not process completions with invalid addresses
	wifi: rtlwifi: 8192de: correct checking of IQK reload
	Linux 4.19.285

Change-Id: Iaf7feb2883577ce4296e9b14d3e6d5f88edf4005
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-06-14 09:45:37 +00:00
Ben Hutchings
53f16fa73f lib: cpu_rmap: Fix potential use-after-free in irq_cpu_rmap_release()
[ Upstream commit 7c5d4801ecf0564c860033d89726b99723c55146 ]

irq_cpu_rmap_release() calls cpu_rmap_put(), which may free the rmap.
So we need to clear the pointer to our glue structure in rmap before
doing that, not after.

Fixes: 4e0473f1060a ("lib: cpu_rmap: Avoid use after free on rmap->obj array entries")
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Link: https://lore.kernel.org/r/ZHo0vwquhOy3FaXc@decadent.org.uk
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-06-14 10:57:13 +02:00
Nathan Chancellor
5666a294c9 lib/dynamic_debug.c: use address-of operator on section symbols
commit 8306b057a85ec07482da5d4b99d5c0b47af69be1 upstream.

Clang warns:

../lib/dynamic_debug.c:1034:24: warning: array comparison always
evaluates to false [-Wtautological-compare]
        if (__start___verbose == __stop___verbose) {
                              ^
1 warning generated.

These are not true arrays, they are linker defined symbols, which are just
addresses.  Using the address of operator silences the warning and does
not change the resulting assembly with either clang/ld.lld or gcc/ld
(tested with diff + objdump -Dr).

Suggested-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Acked-by: Jason Baron <jbaron@akamai.com>
Link: https://github.com/ClangBuiltLinux/linux/issues/894
Link: http://lkml.kernel.org/r/20200220051320.10739-1-natechancellor@gmail.com
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-09 10:24:02 +02:00
Greg Kroah-Hartman
4e2cad2c2a This is the 4.19.284 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmR14SUACgkQONu9yGCS
 aT5twA/9FzPtWeYCa9WdaW3YrlwXAwUSX+Q749XupcGbrXS1cljiB7XzvSQ48Ce9
 FrI+b4UNRmq1sjBq39GMVTCpVcis1PhI5uthvP/eNIazFvAb8Ksidsv10cGKtmi6
 dhe8+z6InAut46npKt+YHLTrgu+rkQ7nWk5thT52JLD2VsTf/AwNvy2wDVrtpwND
 XldYW/jP6GErmPXVdy2nBzP5kFKWpd6DIVrnKrP0g+G1UF6mV1mg2Bt9aoMyWenK
 TU9cv+FwAr40EmPSn6ooJbo0oOgJrkOidaoJEIgzOw4MWv/lNd6dijuKlkfKg56s
 elIa+TAlQBkkfXWNDSg8RCT0Im6iw+qVMmuIUvn4Y6zyFhQS2kBPZHavOHrIdYK3
 HKkEjl1l24z/k7HSkPVS+FR7YxF9EeQunJBJjA3NGLx4woFVoqCgCp5C5cAyC1D1
 lVE8lAPq/R5oIPgsL7WwYCdwvlnoA4R8HFmS/53ySRxQ839A0Ea1vQB96ISPdoGk
 AxU1DarM+BxLQbYVaW+HmDctox0wlhV9pmlSmRNzGDno0OsME9e7grUSxBC96ogf
 GFFYs2zTKE8y9/1LzBQSrJdXHjofOrupIEVHHcb8Bit6tuQ/hAIYl4erzIrJUc1e
 c0OuIcevfYbyUFYzYnWFkPWo0akRWcAIUKba5rzQV4lPpCGOfJc=
 =0ViV
 -----END PGP SIGNATURE-----

Merge 4.19.284 into android-4.19-stable

Changes in 4.19.284
	net: Fix load-tearing on sk->sk_stamp in sock_recv_cmsgs().
	netlink: annotate accesses to nlk->cb_running
	net: annotate sk->sk_err write from do_recvmmsg()
	tcp: reduce POLLOUT events caused by TCP_NOTSENT_LOWAT
	tcp: return EPOLLOUT from tcp_poll only when notsent_bytes is half the limit
	tcp: factor out __tcp_close() helper
	tcp: add annotations around sk->sk_shutdown accesses
	ipvlan:Fix out-of-bounds caused by unclear skb->cb
	net: datagram: fix data-races in datagram_poll()
	af_unix: Fix a data race of sk->sk_receive_queue->qlen.
	af_unix: Fix data races around sk->sk_shutdown.
	fs: hfsplus: remove WARN_ON() from hfsplus_cat_{read,write}_inode()
	drm/amd/display: Use DC_LOG_DC in the trasform pixel function
	regmap: cache: Return error in cache sync operations for REGCACHE_NONE
	memstick: r592: Fix UAF bug in r592_remove due to race condition
	firmware: arm_sdei: Fix sleep from invalid context BUG
	ACPI: EC: Fix oops when removing custom query handlers
	drm/tegra: Avoid potential 32-bit integer overflow
	ACPICA: Avoid undefined behavior: applying zero offset to null pointer
	ACPICA: ACPICA: check null return of ACPI_ALLOCATE_ZEROED in acpi_db_display_objects
	wifi: brcmfmac: cfg80211: Pass the PMK in binary instead of hex
	ext2: Check block size validity during mount
	net: pasemi: Fix return type of pasemi_mac_start_tx()
	net: Catch invalid index in XPS mapping
	lib: cpu_rmap: Avoid use after free on rmap->obj array entries
	scsi: message: mptlan: Fix use after free bug in mptlan_remove() due to race condition
	gfs2: Fix inode height consistency check
	ext4: set goal start correctly in ext4_mb_normalize_request
	ext4: Fix best extent lstart adjustment logic in ext4_mb_new_inode_pa()
	f2fs: fix to drop all dirty pages during umount() if cp_error is set
	wifi: iwlwifi: dvm: Fix memcpy: detected field-spanning write backtrace
	Bluetooth: L2CAP: fix "bad unlock balance" in l2cap_disconnect_rsp
	staging: rtl8192e: Replace macro RTL_PCI_DEVICE with PCI_DEVICE
	HID: logitech-hidpp: Don't use the USB serial for USB devices
	HID: logitech-hidpp: Reconcile USB and Unifying serials
	spi: spi-imx: fix MX51_ECSPI_* macros when cs > 3
	HID: wacom: generic: Set battery quirk only when we see battery data
	usb: typec: tcpm: fix multiple times discover svids error
	serial: 8250: Reinit port->pm on port specific driver unbind
	mcb-pci: Reallocate memory region to avoid memory overlapping
	sched: Fix KCSAN noinstr violation
	recordmcount: Fix memory leaks in the uwrite function
	clk: tegra20: fix gcc-7 constant overflow warning
	Input: xpad - add constants for GIP interface numbers
	phy: st: miphy28lp: use _poll_timeout functions for waits
	mfd: dln2: Fix memory leak in dln2_probe()
	btrfs: replace calls to btrfs_find_free_ino with btrfs_find_free_objectid
	btrfs: fix space cache inconsistency after error loading it from disk
	cpupower: Make TSC read per CPU for Mperf monitor
	af_key: Reject optional tunnel/BEET mode templates in outbound policies
	net: fec: Better handle pm_runtime_get() failing in .remove()
	vsock: avoid to close connected socket after the timeout
	drivers: provide devm_platform_ioremap_resource()
	serial: arc_uart: fix of_iomap leak in `arc_serial_probe`
	ip6_gre: Fix skb_under_panic in __gre6_xmit()
	ip6_gre: Make o_seqno start from 0 in native mode
	ip_gre, ip6_gre: Fix race condition on o_seqno in collect_md mode
	erspan: get the proto with the md version for collect_md
	media: netup_unidvb: fix use-after-free at del_timer()
	drm/exynos: fix g2d_open/close helper function definitions
	net: nsh: Use correct mac_offset to unwind gso skb in nsh_gso_segment()
	net: bcmgenet: Remove phy_stop() from bcmgenet_netif_stop()
	net: bcmgenet: Restore phy_stop() depending upon suspend/close
	cassini: Fix a memory leak in the error handling path of cas_init_one()
	igb: fix bit_shift to be in [1..8] range
	vlan: fix a potential uninit-value in vlan_dev_hard_start_xmit()
	usb-storage: fix deadlock when a scsi command timeouts more than once
	usb: typec: altmodes/displayport: fix pin_assignment_show
	ALSA: hda: Fix Oops by 9.1 surround channel names
	ALSA: hda: Add NVIDIA codec IDs a3 through a7 to patch table
	statfs: enforce statfs[64] structure initialization
	serial: Add support for Advantech PCI-1611U card
	ceph: force updating the msg pointer in non-split case
	tpm/tpm_tis: Disable interrupts for more Lenovo devices
	nilfs2: fix use-after-free bug of nilfs_root in nilfs_evict_inode()
	netfilter: nftables: add nft_parse_register_load() and use it
	netfilter: nftables: add nft_parse_register_store() and use it
	netfilter: nftables: statify nft_parse_register()
	netfilter: nf_tables: validate registers coming from userspace.
	netfilter: nf_tables: add nft_setelem_parse_key()
	netfilter: nf_tables: allow up to 64 bytes in the set element data area
	netfilter: nf_tables: stricter validation of element data
	netfilter: nf_tables: validate NFTA_SET_ELEM_OBJREF based on NFT_SET_OBJECT flag
	netfilter: nf_tables: do not allow RULE_ID to refer to another chain
	HID: wacom: Force pen out of prox if no events have been received in a while
	Add Acer Aspire Ethos 8951G model quirk
	ALSA: hda/realtek - More constifications
	ALSA: hda/realtek - Add Headset Mic supported for HP cPC
	ALSA: hda/realtek - Enable headset mic of Acer X2660G with ALC662
	ALSA: hda/realtek - Enable the headset of Acer N50-600 with ALC662
	ALSA: hda/realtek - The front Mic on a HP machine doesn't work
	ALSA: hda/realtek: Fix the mic type detection issue for ASUS G551JW
	ALSA: hda/realtek - Add headset Mic support for Lenovo ALC897 platform
	ALSA: hda/realtek - ALC897 headset MIC no sound
	ALSA: hda/realtek: Add a quirk for HP EliteDesk 805
	lib/string_helpers: Introduce string_upper() and string_lower() helpers
	usb: gadget: u_ether: Convert prints to device prints
	usb: gadget: u_ether: Fix host MAC address case
	vc_screen: rewrite vcs_size to accept vc, not inode
	vc_screen: reload load of struct vc_data pointer in vcs_write() to avoid UAF
	s390/qdio: get rid of register asm
	s390/qdio: fix do_sqbs() inline assembly constraint
	spi: spi-fsl-spi: automatically adapt bits-per-word in cpu mode
	spi: fsl-spi: Re-organise transfer bits_per_word adaptation
	spi: fsl-cpm: Use 16 bit mode for large transfers with even size
	ALSA: hda/ca0132: add quirk for EVGA X299 DARK
	m68k: Move signal frame following exception on 68020/030
	parisc: Allow to reboot machine after system halt
	btrfs: use nofs when cleaning up aborted transactions
	x86/mm: Avoid incomplete Global INVLPG flushes
	selftests/memfd: Fix unknown type name build failure
	parisc: Fix flush_dcache_page() for usage from irq context
	ALSA: hda/realtek - Fixed one of HP ALC671 platform Headset Mic supported
	ALSA: hda/realtek - Fix inverted bass GPIO pin on Acer 8951G
	udplite: Fix NULL pointer dereference in __sk_mem_raise_allocated().
	USB: core: Add routines for endpoint checks in old drivers
	USB: sisusbvga: Add endpoint checks
	media: radio-shark: Add endpoint checks
	net: fix skb leak in __skb_tstamp_tx()
	bpf: Fix mask generation for 32-bit narrow loads of 64-bit fields
	ipv6: Fix out-of-bounds access in ipv6_find_tlv()
	power: supply: leds: Fix blink to LED on transition
	power: supply: bq27xxx: Fix bq27xxx_battery_update() race condition
	power: supply: bq27xxx: Fix I2C IRQ race on remove
	power: supply: bq27xxx: Fix poll_interval handling and races on remove
	power: supply: sbs-charger: Fix INHIBITED bit for Status reg
	coresight: Fix signedness bug in tmc_etr_buf_insert_barrier_packet()
	xen/pvcalls-back: fix double frees with pvcalls_new_active_socket()
	x86/show_trace_log_lvl: Ensure stack pointer is aligned, again
	ASoC: Intel: Skylake: Fix declaration of enum skl_ch_cfg
	forcedeth: Fix an error handling path in nv_probe()
	3c589_cs: Fix an error handling path in tc589_probe()
	drivers: depend on HAS_IOMEM for devm_platform_ioremap_resource()
	Linux 4.19.284

Change-Id: I88843be551e748e295ea608158a2db7ab4486a65
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-06-08 11:16:01 +00:00
Eli Cohen
d1308bd0b2 lib: cpu_rmap: Avoid use after free on rmap->obj array entries
[ Upstream commit 4e0473f1060aa49621d40a113afde24818101d37 ]

When calling irq_set_affinity_notifier() with NULL at the notify
argument, it will cause freeing of the glue pointer in the
corresponding array entry but will leave the pointer in the array. A
subsequent call to free_irq_cpu_rmap() will try to free this entry again
leading to possible use after free.

Fix that by setting NULL to the array entry and checking that we have
non-zero at the array entry when iterating over the array in
free_irq_cpu_rmap().

The current code does not suffer from this since there are no cases
where irq_set_affinity_notifier(irq, NULL) (note the NULL passed for the
notify arg) is called, followed by a call to free_irq_cpu_rmap() so we
don't hit and issue. Subsequent patches in this series excersize this
flow, hence the required fix.

Cc: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Eli Cohen <elic@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-30 12:42:09 +01:00
Greg Kroah-Hartman
23eb39df01 This is the 4.19.283 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmRkmvoACgkQONu9yGCS
 aT77dw/6A648P7TZgPEqBR5L4aG1u4GC4wE762PUb5YCK1XEWzgUdVPXrcRM6+r4
 ntoKlSJxveJh3TYKLcUAJWvvIt2lbOEdQTb9BS2ALoZv35q5J8Npw/CUP148Vy47
 52PQwr4M76+WTx8bfckrBeVPHyhgNjFtFjuwg1TLfIvo6pGrDPnuNYo57K1/O38m
 Sid+eFrGBkOIjUVlfaStMIP9RVZTUHpPWHWp+cmqGTDK3B0m8BkoTMXM0hLu/fJH
 HPivMQFnyRNa0ZZAe+iQVmUjiruSPbgqNOAGSqTr5FxxSrZ3ZUjvtI0BYTA7eo7q
 BnPbRHpuRQ+YOnDK0Q+Ps96DDNALCz2j8bXXEjJePpOrqv8IoxU8kGx+GVcbnQiJ
 Bd6bqZwXU3uPN8VLTR0KtfypEH6ELbBrCXjeeSw+RQqAgsdEGSbVSgfBtISo7UMt
 iL/VFwl03qdm4Y+Ww544kNMrtDV+Qmq2MWeP6uHzx54ZH6ic5rFhLGamHEuIUg54
 Ux/9dLoByzbVOEMS5SHaqaxcLd/Qx0FtUq02rhsHeV0IEFxviX4jPRet0kn2vVru
 8o+Vh92K+gfNW+zT47GPeTCBRIK+YuH2cwsXJRucGkE7IyDccgyA/v1cchZO9xoD
 oetofMcWiZi3QNY26EVuYA8SlIwURWkhb3yTbFoOx2+jQ6JER6k=
 =VSYH
 -----END PGP SIGNATURE-----

Merge 4.19.283 into android-4.19-stable

Changes in 4.19.283
	wifi: brcmfmac: slab-out-of-bounds read in brcmf_get_assoc_ies()
	bluetooth: Perform careful capability checks in hci_sock_ioctl()
	USB: serial: option: add UNISOC vendor and TOZED LT70C product
	iio: adc: palmas_gpadc: fix NULL dereference on rmmod
	ASoC: Intel: bytcr_rt5640: Add quirk for the Acer Iconia One 7 B1-750
	stmmac: debugfs entry name is not be changed when udev rename device name.
	USB: dwc3: fix runtime pm imbalance on unbind
	perf sched: Cast PTHREAD_STACK_MIN to int as it may turn into sysconf(__SC_THREAD_STACK_MIN_VALUE)
	staging: iio: resolver: ads1210: fix config mode
	debugfs: regset32: Add Runtime PM support
	xhci: fix debugfs register accesses while suspended
	MIPS: fw: Allow firmware to pass a empty env
	pwm: meson: Fix axg ao mux parents
	ring-buffer: Sync IRQ works before buffer destruction
	reiserfs: Add security prefix to xattr name in reiserfs_security_write()
	KVM: nVMX: Emulate NOPs in L2, and PAUSE if it's not intercepted
	i2c: omap: Fix standard mode false ACK readings
	Revert "ubifs: dirty_cow_znode: Fix memleak in error handling path"
	ubifs: Fix memleak when insert_old_idx() failed
	ubi: Fix return value overwrite issue in try_write_vid_and_data()
	ubifs: Free memory for tmpfile name
	selinux: fix Makefile dependencies of flask.h
	selinux: ensure av_permissions.h is built when needed
	drm/rockchip: Drop unbalanced obj unref
	drm/vgem: add missing mutex_destroy
	drm/probe-helper: Cancel previous job before starting new one
	EDAC, skx: Move debugfs node under EDAC's hierarchy
	EDAC/skx: Fix overflows on the DRAM row address mapping arrays
	ARM: dts: qcom: ipq4019: Fix the PCI I/O port range
	media: bdisp: Add missing check for create_workqueue
	media: uapi: add MEDIA_BUS_FMT_METADATA_FIXED media bus format.
	media: av7110: prevent underflow in write_ts_to_decoder()
	firmware: qcom_scm: Clear download bit during reboot
	drm/msm/adreno: Defer enabling runpm until hw_init()
	drm/msm/adreno: drop bogus pm_runtime_set_active()
	x86/apic: Fix atomic update of offset in reserve_eilvt_offset()
	media: dm1105: Fix use after free bug in dm1105_remove due to race condition
	media: saa7134: fix use after free bug in saa7134_finidev due to race condition
	media: rcar_fdp1: Fix the correct variable assignments
	media: rcar_fdp1: Fix refcount leak in probe and remove function
	media: rc: gpio-ir-recv: Fix support for wake-up
	x86/ioapic: Don't return 0 from arch_dynirq_lower_bound()
	arm64: kgdb: Set PSTATE.SS to 1 to re-enable single-step
	debugobjects: Add percpu free pools
	debugobjects: Move printk out of db->lock critical sections
	debugobject: Prevent init race with static objects
	wifi: ath6kl: minor fix for allocation size
	wifi: ath9k: hif_usb: fix memory leak of remain_skbs
	wifi: ath5k: fix an off by one check in ath5k_eeprom_read_freq_list()
	wifi: ath6kl: reduce WARN to dev_dbg() in callback
	tools: bpftool: Remove invalid \' json escape
	scm: fix MSG_CTRUNC setting condition for SO_PASSSEC
	vlan: partially enable SIOCSHWTSTAMP in container
	net/packet: convert po->origdev to an atomic flag
	net/packet: convert po->auxdata to an atomic flag
	scsi: target: iscsit: Fix TAS handling during conn cleanup
	scsi: megaraid: Fix mega_cmd_done() CMDID_INT_CMDS
	rtlwifi: rtl_pci: Fix memory leak when hardware init fails
	rtlwifi: Start changing RT_TRACE into rtl_dbg
	rtlwifi: Replace RT_TRACE with rtl_dbg
	wifi: rtlwifi: fix incorrect error codes in rtl_debugfs_set_write_rfreg()
	wifi: rtlwifi: fix incorrect error codes in rtl_debugfs_set_write_reg()
	bpftool: Fix bug for long instructions in program CFG dumps
	crypto: drbg - make drbg_prepare_hrng() handle jent instantiation errors
	crypto: drbg - Only fail when jent is unavailable in FIPS mode
	md/raid10: fix leak of 'r10bio->remaining' for recovery
	md/raid10: fix memleak for 'conf->bio_split'
	md: update the optimal I/O size on reshape
	md/raid10: fix memleak of md thread
	wifi: iwlwifi: make the loop for card preparation effective
	wifi: iwlwifi: mvm: check firmware response size
	ixgbe: Allow flow hash to be set via ethtool
	ixgbe: Enable setting RSS table to default values
	netfilter: nf_tables: don't write table validation state without mutex
	ipv4: Fix potential uninit variable access bug in __ip_make_skb()
	Revert "Bluetooth: btsdio: fix use after free bug in btsdio_remove due to unfinished work"
	netlink: Use copy_to_user() for optval in netlink_getsockopt().
	net: amd: Fix link leak when verifying config failed
	tcp/udp: Fix memleaks of sk and zerocopy skbs with TX timestamp.
	pstore: Revert pmsg_lock back to a normal mutex
	usb: host: xhci-rcar: remove leftover quirk handling
	fpga: bridge: fix kernel-doc parameter description
	usb: gadget: udc: renesas_usb3: Fix use after free bug in renesas_usb3_remove due to race condition
	linux/vt_buffer.h: allow either builtin or modular for macros
	spi: qup: fix PM reference leak in spi_qup_remove()
	spi: qup: Don't skip cleanup in remove's error path
	spi: fsl-spi: Fix CPM/QE mode Litte Endian
	vmci_host: fix a race condition in vmci_host_poll() causing GPF
	of: Fix modalias string generation
	ia64: mm/contig: fix section mismatch warning/error
	ia64: salinfo: placate defined-but-not-used warning
	mtd: spi-nor: cadence-quadspi: Make driver independent of flash geometry
	mtd: spi-nor: cadence-quadspi: Don't initialize rx_dma_complete on failure
	mtd: spi-nor: cadence-quadspi: Handle probe deferral while requesting DMA channel
	spi: cadence-quadspi: fix suspend-resume implementations
	uapi/linux/const.h: prefer ISO-friendly __typeof__
	sh: sq: Fix incorrect element size for allocating bitmap buffer
	usb: chipidea: fix missing goto in `ci_hdrc_probe`
	tty: serial: fsl_lpuart: adjust buffer length to the intended size
	serial: 8250: Add missing wakeup event reporting
	staging: rtl8192e: Fix W_DISABLE# does not work after stop/start
	spmi: Add a check for remove callback when removing a SPMI driver
	macintosh/windfarm_smu_sat: Add missing of_node_put()
	powerpc/mpc512x: fix resource printk format warning
	powerpc/wii: fix resource printk format warnings
	powerpc/sysdev/tsi108: fix resource printk format warnings
	macintosh: via-pmu-led: requires ATA to be set
	powerpc/rtas: use memmove for potentially overlapping buffer copy
	perf/core: Fix hardlockup failure caused by perf throttle
	RDMA/rdmavt: Delete unnecessary NULL check
	RDMA/mlx4: Prevent shift wrapping in set_user_sq_size()
	power: supply: generic-adc-battery: fix unit scaling
	clk: add missing of_node_put() in "assigned-clocks" property parsing
	IB/hfi1: Fix SDMA mmu_rb_node not being evicted in LRU order
	NFSv4.1: Always send a RECLAIM_COMPLETE after establishing lease
	SUNRPC: remove the maximum number of retries in call_bind_status
	RDMA/mlx5: Use correct device num_ports when modify DC
	openrisc: Properly store r31 to pt_regs on unhandled exceptions
	pwm: mtk-disp: Don't check the return code of pwmchip_remove()
	pwm: mtk-disp: Adjust the clocks to avoid them mismatch
	pwm: mtk-disp: Disable shadow registers before setting backlight values
	phy: tegra: xusb: Add missing tegra_xusb_port_unregister for usb2_port and ulpi_port
	dmaengine: at_xdmac: do not enable all cyclic channels
	parisc: Fix argument pointer in real64_call_asm()
	nilfs2: do not write dirty data after degenerating to read-only
	nilfs2: fix infinite loop in nilfs_mdt_get_block()
	md/raid10: fix null-ptr-deref in raid10_sync_request
	wifi: rtl8xxxu: RTL8192EU always needs full init
	clk: rockchip: rk3399: allow clk_cifout to force clk_cifout_src to reparent
	btrfs: scrub: reject unsupported scrub flags
	s390/dasd: fix hanging blockdevice after request requeue
	dm integrity: call kmem_cache_destroy() in dm_integrity_init() error path
	dm flakey: fix a crash with invalid table line
	dm ioctl: fix nested locking in table_clear() to remove deadlock concern
	perf auxtrace: Fix address filter entire kernel size
	debugobject: Ensure pool refill (again)
	netfilter: nf_tables: deactivate anonymous set from preparation phase
	nohz: Add TICK_DEP_BIT_RCU
	tick/nohz: Fix cpu_is_hotpluggable() by checking with nohz subsystem
	ipmi: Fix SSIF flag requests
	ipmi: Fix how the lower layers are told to watch for messages
	ipmi_ssif: Rename idle state and check
	ipmi: fix SSIF not responding under certain cond.
	dm verity: skip redundant verity_handle_err() on I/O errors
	dm verity: fix error handling for check_at_most_once on FEC
	kernel/relay.c: fix read_pos error when multiple readers
	relayfs: fix out-of-bounds access in relay_file_read
	sit: update dev->needed_headroom in ipip6_tunnel_bind_dev()
	net: dsa: mv88e6xxx: Add missing watchdog ops for 6320 family
	net: dsa: mv88e6xxx: add mv88e6321 rsvd2cpu
	writeback: fix call of incorrect macro
	net/sched: act_mirred: Add carrier check
	rxrpc: Fix hard call timeout units
	af_packet: Don't send zero-byte data in packet_sendmsg_spkt().
	drm/amdgpu: Add amdgpu_gfx_off_ctrl function
	drm/amdgpu: Put enable gfx off feature to a delay thread
	drm/amdgpu: Add command to override the context priority.
	drm/amdgpu: add a missing lock for AMDGPU_SCHED
	ALSA: caiaq: input: Add error handling for unsupported input methods in `snd_usb_caiaq_input_init`
	virtio_net: split free_unused_bufs()
	virtio_net: suppress cpu stall when free_unused_bufs
	perf vendor events power9: Remove UTF-8 characters from JSON files
	perf map: Delete two variable initialisations before null pointer checks in sort__sym_from_cmp()
	perf symbols: Fix return incorrect build_id size in elf_read_build_id()
	btrfs: fix btrfs_prev_leaf() to not return the same key twice
	btrfs: print-tree: parent bytenr must be aligned to sector size
	cifs: fix pcchunk length type in smb2_copychunk_range
	platform/x86: touchscreen_dmi: Add info for the Dexp Ursus KX210i
	sh: math-emu: fix macro redefined warning
	sh: init: use OF_EARLY_FLATTREE for early init
	sh: nmi_debug: fix return value of __setup handler
	ARM: dts: exynos: fix WM8960 clock name in Itop Elite
	ARM: dts: s5pv210: correct MIPI CSIS clock name
	drm/panel: otm8009a: Set backlight parent to panel device
	HID: wacom: Set a default resolution for older tablets
	ext4: fix WARNING in mb_find_extent
	ext4: avoid a potential slab-out-of-bounds in ext4_group_desc_csum
	ext4: improve error recovery code paths in __ext4_remount()
	ext4: add bounds checking in get_max_inline_xattr_value_size()
	ext4: bail out of ext4_xattr_ibody_get() fails for any reason
	ext4: remove a BUG_ON in ext4_mb_release_group_pa()
	ext4: fix invalid free tracking in ext4_xattr_move_to_block()
	tty: Prevent writing chars during tcsetattr TCSADRAIN/FLUSH
	serial: 8250: Fix serial8250_tx_empty() race with DMA Tx
	drbd: correctly submit flush bio on barrier
	PCI: pciehp: Use down_read/write_nested(reset_lock) to fix lockdep errors
	PCI: pciehp: Fix AB-BA deadlock between reset_lock and device_lock
	printk: declare printk_deferred_{enter,safe}() in include/linux/printk.h
	mm/page_alloc: fix potential deadlock on zonelist_update_seq seqlock
	Linux 4.19.283

Change-Id: Id2f95d527f356c874a9e01e57f1d816b9fa34e8b
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-05-18 15:51:07 +00:00
Thomas Gleixner
f653ce4db5 debugobject: Ensure pool refill (again)
commit 0af462f19e635ad522f28981238334620881badc upstream.

The recent fix to ensure atomicity of lookup and allocation inadvertently
broke the pool refill mechanism.

Prior to that change debug_objects_activate() and debug_objecs_assert_init()
invoked debug_objecs_init() to set up the tracking object for statically
initialized objects. That's not longer the case and debug_objecs_init() is
now the only place which does pool refills.

Depending on the number of statically initialized objects this can be
enough to actually deplete the pool, which was observed by Ido via a
debugobjects OOM warning.

Restore the old behaviour by adding explicit refill opportunities to
debug_objects_activate() and debug_objecs_assert_init().

Fixes: 63a759694eed ("debugobject: Prevent init race with static objects")
Reported-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Tested-by: Ido Schimmel <idosch@nvidia.com>
Link: https://lore.kernel.org/r/871qk05a9d.ffs@tglx
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-17 11:13:22 +02:00
Thomas Gleixner
970cc63891 debugobject: Prevent init race with static objects
[ Upstream commit 63a759694eed61025713b3e14dd827c8548daadc ]

Statically initialized objects are usually not initialized via the init()
function of the subsystem. They are special cased and the subsystem
provides a function to validate whether an object which is not yet tracked
by debugobjects is statically initialized. This means the object is started
to be tracked on first use, e.g. activation.

This works perfectly fine, unless there are two concurrent operations on
that object. Schspa decoded the problem:

T0 	          	    	    T1

debug_object_assert_init(addr)
  lock_hash_bucket()
  obj = lookup_object(addr);
  if (!obj) {
  	unlock_hash_bucket();
	- > preemption
			            lock_subsytem_object(addr);
				      activate_object(addr)
				      lock_hash_bucket();
				      obj = lookup_object(addr);
				      if (!obj) {
				    	unlock_hash_bucket();
					if (is_static_object(addr))
					   init_and_track(addr);
				      lock_hash_bucket();
				      obj = lookup_object(addr);
				      obj->state = ACTIVATED;
				      unlock_hash_bucket();

				    subsys function modifies content of addr,
				    so static object detection does
				    not longer work.

				    unlock_subsytem_object(addr);

        if (is_static_object(addr)) <- Fails

	  debugobject emits a warning and invokes the fixup function which
	  reinitializes the already active object in the worst case.

This race exists forever, but was never observed until mod_timer() got a
debug_object_assert_init() added which is outside of the timer base lock
held section right at the beginning of the function to cover the lockless
early exit points too.

Rework the code so that the lookup, the static object check and the
tracking object association happens atomically under the hash bucket
lock. This prevents the issue completely as all callers are serialized on
the hash bucket lock and therefore cannot observe inconsistent state.

Fixes: 3ac7fe5a4a ("infrastructure to debug (dynamic) objects")
Reported-by: syzbot+5093ba19745994288b53@syzkaller.appspotmail.com
Debugged-by: Schspa Shi <schspa@gmail.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Link: https://syzkaller.appspot.com/bug?id=22c8a5938eab640d1c6bcc0e3dc7be519d878462
Link: https://lore.kernel.org/lkml/20230303161906.831686-1-schspa@gmail.com
Link: https://lore.kernel.org/r/87zg7dzgao.ffs@tglx
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-17 11:13:11 +02:00
Waiman Long
c1b1944cfb debugobjects: Move printk out of db->lock critical sections
[ Upstream commit d5f34153e526903abe71869dbbc898bfc0f69373 ]

The db->lock is a raw spinlock and so the lock hold time is supposed
to be short. This will not be the case when printk() is being involved
in some of the critical sections. In order to avoid the long hold time,
in case some messages need to be printed, the debug_object_is_on_stack()
and debug_print_object() calls are now moved out of those critical
sections.

Signed-off-by: Waiman Long <longman@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Yang Shi <yang.shi@linux.alibaba.com>
Cc: "Joel Fernandes (Google)" <joel@joelfernandes.org>
Cc: Qian Cai <cai@gmx.us>
Cc: Zhong Jiang <zhongjiang@huawei.com>
Link: https://lkml.kernel.org/r/20190520141450.7575-6-longman@redhat.com
Stable-dep-of: 63a759694eed ("debugobject: Prevent init race with static objects")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-17 11:13:10 +02:00
Waiman Long
0c6fcf1425 debugobjects: Add percpu free pools
[ Upstream commit d86998b17a01050c0232231fa481e65ef8171ca6 ]

When a multi-threaded workload does a lot of small memory object
allocations and deallocations, it may cause the allocation and freeing of
many debug objects. This will make the global pool_lock a bottleneck in the
performance of the workload.  Since interrupts are disabled when acquiring
the pool_lock, it may even cause hard lockups to happen.

To reduce contention of the global pool_lock, add a percpu debug object
free pool that can be used to buffer some of the debug object allocation
and freeing requests without acquiring the pool_lock.  Each CPU will now
have a percpu free pool that can hold up to a maximum of 64 debug
objects. Allocation and freeing requests will go to the percpu free pool
first. If that fails, the pool_lock will be taken and the global free pool
will be used.

The presence or absence of obj_cache is used as a marker to see if the
percpu cache should be used.

Signed-off-by: Waiman Long <longman@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Yang Shi <yang.shi@linux.alibaba.com>
Cc: "Joel Fernandes (Google)" <joel@joelfernandes.org>
Cc: Qian Cai <cai@gmx.us>
Cc: Zhong Jiang <zhongjiang@huawei.com>
Link: https://lkml.kernel.org/r/20190520141450.7575-2-longman@redhat.com
Stable-dep-of: 63a759694eed ("debugobject: Prevent init race with static objects")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-17 11:13:10 +02:00
Michael Bestas
e4b3323f61
Merge tag 'ASB-2023-04-05_4.19-stable' of https://android.googlesource.com/kernel/common into android13-4.19-kona
https://source.android.com/docs/security/bulletin/2023-04-01
CVE-2022-4696
CVE-2023-20941

* tag 'ASB-2023-04-05_4.19-stable' of https://android.googlesource.com/kernel/common:
  UPSTREAM: ext4: fix kernel BUG in 'ext4_write_inline_data_end()'
  UPSTREAM: fsverity: don't drop pagecache at end of FS_IOC_ENABLE_VERITY
  UPSTREAM: fsverity: Remove WQ_UNBOUND from fsverity read workqueue
  BACKPORT: blk-mq: clear stale request in tags->rq[] before freeing one request pool
  Linux 4.19.279
  HID: uhid: Over-ride the default maximum data buffer value with our own
  HID: core: Provide new max_buffer_size attribute to over-ride the default
  serial: 8250_em: Fix UART port type
  drm/i915: Don't use stolen memory for ring buffers with LLC
  x86/mm: Fix use of uninitialized buffer in sme_enable()
  fbdev: stifb: Provide valid pixelclock and add fb_check_var() checks
  ftrace: Fix invalid address access in lookup_rec() when index is 0
  tracing: Make tracepoint lockdep check actually test something
  tracing: Check field value in hist_field_name()
  sh: intc: Avoid spurious sizeof-pointer-div warning
  drm/amdkfd: Fix an illegal memory access
  ext4: fix task hung in ext4_xattr_delete_inode
  ext4: fail ext4_iget if special inode unallocated
  jffs2: correct logic when creating a hole in jffs2_write_begin
  mmc: atmel-mci: fix race between stop command and start of next command
  media: m5mols: fix off-by-one loop termination error
  hwmon: (xgene) Fix use after free bug in xgene_hwmon_remove due to race condition
  hwmon: (adt7475) Fix masking of hysteresis registers
  hwmon: (adt7475) Display smoothing attributes in correct order
  ethernet: sun: add check for the mdesc_grab()
  net/iucv: Fix size of interrupt data
  net: usb: smsc75xx: Move packet length check to prevent kernel panic in skb_pull
  ipv4: Fix incorrect table ID in IOCTL path
  block: sunvdc: add check for mdesc_grab() returning NULL
  nvmet: avoid potential UAF in nvmet_req_complete()
  net: usb: smsc75xx: Limit packet length to skb->len
  nfc: st-nci: Fix use after free bug in ndlc_remove due to race condition
  net: phy: smsc: bail out in lan87xx_read_status if genphy_read_status fails
  net: tunnels: annotate lockless accesses to dev->needed_headroom
  qed/qed_dev: guard against a possible division by zero
  nfc: pn533: initialize struct pn533_out_arg properly
  tcp: tcp_make_synack() can be called from process context
  clk: HI655X: select REGMAP instead of depending on it
  fs: sysfs_emit_at: Remove PAGE_SIZE alignment check
  ext4: fix cgroup writeback accounting with fs-layer encryption
  UPSTREAM: ext4: fix another off-by-one fsmap error on 1k block filesystems
  Linux 4.19.278
  ila: do not generate empty messages in ila_xlat_nl_cmd_get_mapping()
  nfc: fdp: add null check of devm_kmalloc_array in fdp_nci_i2c_read_device_properties
  net: caif: Fix use-after-free in cfusbl_device_notify()
  drm/i915: Don't use BAR mappings for ring buffers with LLC
  tipc: improve function tipc_wait_for_cond()
  media: ov5640: Fix analogue gain control
  PCI: Add SolidRun vendor ID
  macintosh: windfarm: Use unsigned type for 1-bit bitfields
  alpha: fix R_ALPHA_LITERAL reloc for large modules
  MIPS: Fix a compilation issue
  Revert "spi: mt7621: Fix an error message in mt7621_spi_probe()"
  scsi: core: Remove the /proc/scsi/${proc_name} directory earlier
  kbuild: generate modules.order only in directories visited by obj-y/m
  kbuild: fix false-positive need-builtin calculation
  udf: Detect system inodes linked into directory hierarchy
  udf: Preserve link count of system files
  udf: Remove pointless union in udf_inode_info
  udf: reduce leakage of blocks related to named streams
  udf: Explain handling of load_nls() failure
  nfc: change order inside nfc_se_io error path
  ext4: zero i_disksize when initializing the bootloader inode
  ext4: fix WARNING in ext4_update_inline_data
  ext4: move where set the MAY_INLINE_DATA flag is set
  ext4: fix another off-by-one fsmap error on 1k block filesystems
  ext4: fix RENAME_WHITEOUT handling for inline directories
  x86/CPU/AMD: Disable XSAVES on AMD family 0x17
  fs: prevent out-of-bounds array speculation when closing a file descriptor
  Linux 4.19.277
  staging: rtl8192e: Remove call_usermodehelper starting RadioPower.sh
  staging: rtl8192e: Remove function ..dm_check_ac_dc_power calling a script
  wifi: cfg80211: Partial revert "wifi: cfg80211: Fix use after free for wext"
  Linux 4.19.276
  thermal: intel: powerclamp: Fix cur_state for multi package system
  f2fs: fix cgroup writeback accounting with fs-layer encryption
  media: uvcvideo: Fix race condition with usb_kill_urb
  media: uvcvideo: Provide sync and async uvc_ctrl_status_event
  tcp: Fix listen() regression in 4.19.270
  s390/setup: init jump labels before command line parsing
  s390/maccess: add no DAT mode to kernel_write
  Bluetooth: hci_sock: purge socket queues in the destruct() callback
  phy: rockchip-typec: Fix unsigned comparison with less than zero
  usb: uvc: Enumerate valid values for color matching
  USB: ene_usb6250: Allocate enough memory for full object
  usb: host: xhci: mvebu: Iterate over array indexes instead of using pointer math
  iio: accel: mma9551_core: Prevent uninitialized variable in mma9551_read_config_word()
  iio: accel: mma9551_core: Prevent uninitialized variable in mma9551_read_status_word()
  tools/iio/iio_utils:fix memory leak
  mei: bus-fixup:upon error print return values of send and receive
  tty: serial: fsl_lpuart: disable the CTS when send break signal
  tty: fix out-of-bounds access in tty_driver_lookup_tty()
  media: uvcvideo: Silence memcpy() run-time false positive warnings
  media: uvcvideo: Handle errors from calls to usb_string
  media: uvcvideo: Handle cameras with invalid descriptors
  firmware/efi sysfb_efi: Add quirk for Lenovo IdeaPad Duet 3
  tracing: Add NULL checks for buffer in ring_buffer_free_read_page()
  thermal: intel: quark_dts: fix error pointer dereference
  scsi: ipr: Work around fortify-string warning
  vc_screen: modify vcs_size() handling in vcs_read()
  tcp: tcp_check_req() can be called from process context
  ARM: dts: spear320-hmi: correct STMPE GPIO compatible
  nfc: fix memory leak of se_io context in nfc_genl_se_io
  9p/rdma: unmap receive dma buffer in rdma_request()/post_recv()
  9p/xen: fix connection sequence
  9p/xen: fix version parsing
  net: fix __dev_kfree_skb_any() vs drop monitor
  netfilter: ctnetlink: fix possible refcount leak in ctnetlink_create_conntrack()
  watchdog: pcwd_usb: Fix attempting to access uninitialized memory
  watchdog: Fix kmemleak in watchdog_cdev_register
  watchdog: at91sam9_wdt: use devm_request_irq to avoid missing free_irq() in error path
  x86: um: vdso: Add '%rcx' and '%r11' to the syscall clobber list
  ubi: ubi_wl_put_peb: Fix infinite loop when wear-leveling work failed
  ubi: Fix UAF wear-leveling entry in eraseblk_count_seq_show()
  ubifs: ubifs_writepage: Mark page dirty after writing inode failed
  ubifs: dirty_cow_znode: Fix memleak in error handling path
  ubifs: Re-statistic cleaned znode count if commit failed
  ubi: Fix possible null-ptr-deref in ubi_free_volume()
  ubi: Fix unreferenced object reported by kmemleak in ubi_resize_volume()
  ubi: Fix use-after-free when volume resizing failed
  ubifs: Reserve one leb for each journal head while doing budget
  ubifs: do_rename: Fix wrong space budget when target inode's nlink > 1
  ubifs: Fix wrong dirty space budget for dirty inode
  ubifs: Rectify space budget for ubifs_xrename()
  ubifs: Rectify space budget for ubifs_symlink() if symlink is encrypted
  ubi: ensure that VID header offset + VID header size <= alloc, size
  um: vector: Fix memory leak in vector_config
  pwm: stm32-lp: fix the check on arr and cmp registers update
  fs/jfs: fix shift exponent db_agl2size negative
  net/sched: Retire tcindex classifier
  kbuild: Port silent mode detection to future gnu make.
  wifi: ath9k: use proper statements in conditionals
  drm/radeon: Fix eDP for single-display iMac11,2
  PCI: Avoid FLR for AMD FCH AHCI adapters
  scsi: ses: Fix slab-out-of-bounds in ses_intf_remove()
  scsi: ses: Fix possible desc_ptr out-of-bounds accesses
  scsi: ses: Fix possible addl_desc_ptr out-of-bounds accesses
  scsi: ses: Fix slab-out-of-bounds in ses_enclosure_data_process()
  scsi: ses: Don't attach if enclosure has no components
  scsi: qla2xxx: Fix erroneous link down
  scsi: qla2xxx: Fix link failure in NPIV environment
  ktest.pl: Add RUN_TIMEOUT option with default unlimited
  ktest.pl: Fix missing "end_monitor" when machine check fails
  ktest.pl: Give back console on Ctrt^C on monitor
  media: ipu3-cio2: Fix PM runtime usage_count in driver unbind
  mips: fix syscall_get_nr
  alpha: fix FEN fault handling
  rbd: avoid use-after-free in do_rbd_add() when rbd_dev_create() fails
  ARM: dts: exynos: correct TMU phandle in Odroid XU
  ARM: dts: exynos: correct TMU phandle in Exynos4
  dm flakey: don't corrupt the zero page
  dm flakey: fix logic when corrupting a bio
  wifi: cfg80211: Fix use after free for wext
  wifi: rtl8xxxu: Use a longer retry limit of 48
  ext4: refuse to create ea block when umounted
  ext4: optimize ea_inode block expansion
  ALSA: ice1712: Do not left ice->gpio_mutex locked in aureon_add_controls()
  irqdomain: Drop bogus fwspec-mapping error handling
  irqdomain: Fix disassociation race
  irqdomain: Fix association race
  ima: Align ima_file_mmap() parameters with mmap_file LSM hook
  Documentation/hw-vuln: Document the interaction between IBRS and STIBP
  x86/speculation: Allow enabling STIBP with legacy IBRS
  x86/microcode/AMD: Fix mixed steppings support
  x86/microcode/AMD: Add a @cpu parameter to the reloading functions
  x86/microcode/amd: Remove load_microcode_amd()'s bsp parameter
  x86/kprobes: Fix arch_check_optimized_kprobe check within optimized_kprobe range
  x86/kprobes: Fix __recover_optprobed_insn check optimizing logic
  x86/reboot: Disable SVM, not just VMX, when stopping CPUs
  x86/reboot: Disable virtualization in an emergency if SVM is supported
  x86/crash: Disable virt in core NMI crash handler to avoid double shootdown
  x86/virt: Force GIF=1 prior to disabling SVM (for reboot flows)
  udf: Fix file corruption when appending just after end of preallocated extent
  udf: Do not update file length for failed writes to inline files
  udf: Do not bother merging very long extents
  udf: Truncate added extents on failed expansion
  ocfs2: fix non-auto defrag path not working issue
  ocfs2: fix defrag path triggering jbd2 ASSERT
  f2fs: fix information leak in f2fs_move_inline_dirents()
  fs: hfsplus: fix UAF issue in hfsplus_put_super
  hfs: fix missing hfs_bnode_get() in __hfs_bnode_create
  ARM: dts: exynos: correct HDMI phy compatible in Exynos4
  s390/kprobes: fix current_kprobe never cleared after kprobes reenter
  s390/kprobes: fix irq mask clobbering on kprobe reenter from post_handler
  s390: discard .interp section
  rtc: pm8xxx: fix set-alarm race
  firmware: coreboot: framebuffer: Ignore reserved pixel color bits
  wifi: rtl8xxxu: fixing transmisison failure for rtl8192eu
  dm cache: add cond_resched() to various workqueue loops
  dm thin: add cond_resched() to various workqueue loops
  pinctrl: at91: use devm_kasprintf() to avoid potential leaks
  regulator: s5m8767: Bounds check id indexing into arrays
  regulator: max77802: Bounds check regulator id against opmode
  ASoC: kirkwood: Iterate over array indexes instead of using pointer math
  docs/scripts/gdb: add necessary make scripts_gdb step
  drm/msm/dsi: Add missing check for alloc_ordered_workqueue
  drm/radeon: free iio for atombios when driver shutdown
  drm/amd/display: Fix potential null-deref in dm_resume
  net/mlx5: fw_tracer: Fix debug print
  ACPI: video: Fix Lenovo Ideapad Z570 DMI match
  m68k: Check syscall_trace_enter() return code
  net: bcmgenet: Add a check for oversized packets
  ACPI: Don't build ACPICA with '-Os'
  inet: fix fast path in __inet_hash_connect()
  wifi: brcmfmac: ensure CLM version is null-terminated to prevent stack-out-of-bounds
  x86/bugs: Reset speculation control settings on init
  timers: Prevent union confusion from unexpected restart_syscall()
  thermal: intel: Fix unsigned comparison with less than zero
  rcu: Suppress smp_processor_id() complaint in synchronize_rcu_expedited_wait()
  wifi: brcmfmac: Fix potential stack-out-of-bounds in brcmf_c_preinit_dcmds()
  ARM: dts: exynos: Use Exynos5420 compatible for the MIPI video phy
  udf: Define EFSCORRUPTED error code
  rpmsg: glink: Avoid infinite loop on intent for missing channel
  media: usb: siano: Fix use after free bugs caused by do_submit_urb
  media: i2c: ov7670: 0 instead of -EINVAL was returned
  media: rc: Fix use-after-free bugs caused by ene_tx_irqsim()
  media: i2c: ov772x: Fix memleak in ov772x_probe()
  powerpc: Remove linker flag from KBUILD_AFLAGS
  media: platform: ti: Add missing check for devm_regulator_get
  MIPS: vpe-mt: drop physical_memsize
  powerpc/rtas: ensure 4KB alignment for rtas_data_buf
  powerpc/rtas: make all exports GPL
  powerpc/pseries/lparcfg: add missing RTAS retry status handling
  clk: Honor CLK_OPS_PARENT_ENABLE in clk_core_is_enabled()
  powerpc/powernv/ioda: Skip unallocated resources when mapping to PE
  Input: ads7846 - don't check penirq immediately for 7845
  Input: ads7846 - don't report pressure for ads7845
  mtd: rawnand: sunxi: Fix the size of the last OOB region
  mfd: pcf50633-adc: Fix potential memleak in pcf50633_adc_async_read()
  selftests/ftrace: Fix bash specific "==" operator
  sparc: allow PM configs for sparc32 COMPILE_TEST
  perf tools: Fix auto-complete on aarch64
  perf llvm: Fix inadvertent file creation
  gfs2: jdata writepage fix
  cifs: Fix warning and UAF when destroy the MR list
  cifs: Fix lost destroy smbd connection when MR allocate failed
  nfsd: fix race to check ls_layouts
  dm: remove flush_scheduled_work() during local_exit()
  hwmon: (mlxreg-fan) Return zero speed for broken fan
  spi: bcm63xx-hsspi: Fix multi-bit mode setting
  spi: bcm63xx-hsspi: fix pm_runtime
  scsi: aic94xx: Add missing check for dma_map_single()
  hwmon: (ltc2945) Handle error case in ltc2945_value_store
  gpio: vf610: connect GPIO label to dev name
  ASoC: soc-compress.c: fixup private_data on snd_soc_new_compress()
  drm/mediatek: Clean dangling pointer on bind error path
  drm/mediatek: Drop unbalanced obj unref
  gpu: host1x: Don't skip assigning syncpoints to channels
  drm/msm/dpu: Add check for pstates
  drm/msm: use strscpy instead of strncpy
  drm/mipi-dsi: Fix byte order of 16-bit DCS set/get brightness
  ALSA: hda/ca0132: minor fix for allocation size
  pinctrl: rockchip: Fix refcount leak in rockchip_pinctrl_parse_groups
  pinctrl: pinctrl-rockchip: Fix a bunch of kerneldoc misdemeanours
  drm/msm/hdmi: Add missing check for alloc_ordered_workqueue
  gpu: ipu-v3: common: Add of_node_put() for reference returned by of_graph_get_port_by_id()
  drm/vc4: dpi: Fix format mapping for RGB565
  drm/vc4: dpi: Add option for inverting pixel clock and output enable
  drm: Clarify definition of the DRM_BUS_FLAG_(PIXDATA|SYNC)_* macros
  drm/bridge: megachips: Fix error handling in i2c_register_driver()
  drm: mxsfb: DRM_MXSFB should depend on ARCH_MXS || ARCH_MXC
  selftest: fib_tests: Always cleanup before exit
  irqchip/irq-bcm7120-l2: Set IRQ_LEVEL for level triggered interrupts
  irqchip/irq-brcmstb-l2: Set IRQ_LEVEL for level triggered interrupts
  can: esd_usb: Move mislocated storage of SJA1000_ECC_SEG bits in case of a bus error
  wifi: mac80211: make rate u32 in sta_set_rate_info_rx()
  crypto: crypto4xx - Call dma_unmap_page when done
  wifi: mwifiex: fix loop iterator in mwifiex_update_ampdu_txwinsize()
  wifi: iwl4965: Add missing check for create_singlethread_workqueue()
  wifi: iwl3945: Add missing check for create_singlethread_workqueue
  RISC-V: time: initialize hrtimer based broadcast clock event device
  m68k: /proc/hardware should depend on PROC_FS
  crypto: rsa-pkcs1pad - Use akcipher_request_complete
  rds: rds_rm_zerocopy_callback() correct order for list_add_tail()
  libbpf: Fix alen calculation in libbpf_nla_dump_errormsg()
  Bluetooth: L2CAP: Fix potential user-after-free
  irqchip/irq-mvebu-gicp: Fix refcount leak in mvebu_gicp_probe
  irqchip/alpine-msi: Fix refcount leak in alpine_msix_init_domains
  net/mlx5: Enhance debug print in page allocation failure
  powercap: fix possible name leak in powercap_register_zone()
  crypto: seqiv - Handle EBUSY correctly
  ACPI: battery: Fix missing NUL-termination with large strings
  wifi: ath9k: Fix potential stack-out-of-bounds write in ath9k_wmi_rsp_callback()
  wifi: ath9k: hif_usb: clean up skbs if ath9k_hif_usb_rx_stream() fails
  ath9k: htc: clean up statistics macros
  ath9k: hif_usb: simplify if-if to if-else
  wifi: ath9k: htc_hst: free skb in ath9k_htc_rx_msg() if there is no callback function
  wifi: orinoco: check return value of hermes_write_wordrec()
  ACPICA: nsrepair: handle cases without a return value correctly
  lib/mpi: Fix buffer overrun when SG is too long
  genirq: Fix the return type of kstat_cpu_irqs_sum()
  ACPICA: Drop port I/O validation for some regions
  wifi: wl3501_cs: don't call kfree_skb() under spin_lock_irqsave()
  wifi: libertas: cmdresp: don't call kfree_skb() under spin_lock_irqsave()
  wifi: libertas: main: don't call kfree_skb() under spin_lock_irqsave()
  wifi: libertas: if_usb: don't call kfree_skb() under spin_lock_irqsave()
  wifi: libertas_tf: don't call kfree_skb() under spin_lock_irqsave()
  wifi: brcmfmac: unmap dma buffer in brcmf_msgbuf_alloc_pktid()
  wifi: brcmfmac: fix potential memory leak in brcmf_netdev_start_xmit()
  wifi: ipw2200: fix memory leak in ipw_wdev_init()
  wifi: ipw2x00: don't call dev_kfree_skb() under spin_lock_irqsave()
  ipw2x00: switch from 'pci_' to 'dma_' API
  wifi: rtlwifi: Fix global-out-of-bounds bug in _rtl8812ae_phy_set_txpower_limit()
  rtlwifi: fix -Wpointer-sign warning
  wifi: rtl8xxxu: don't call dev_kfree_skb() under spin_lock_irqsave()
  wifi: libertas: fix memory leak in lbs_init_adapter()
  wifi: rsi: Fix memory leak in rsi_coex_attach()
  block: bio-integrity: Copy flags when bio_integrity_payload is cloned
  blk-mq: remove stale comment for blk_mq_sched_mark_restart_hctx
  arm64: dts: mediatek: mt7622: Add missing pwm-cells to pwm node
  arm64: dts: amlogic: meson-gxl: add missing unit address to eth-phy-mux node name
  arm64: dts: amlogic: meson-gx: add missing unit address to rng node name
  arm64: dts: amlogic: meson-gx: add missing SCPI sensors compatible
  arm64: dts: amlogic: meson-axg: fix SCPI clock dvfs node name
  arm64: dts: meson-axg: enable SCPI
  arm64: dts: amlogic: meson-gx: fix SCPI clock dvfs node name
  ARM: imx: Call ida_simple_remove() for ida_simple_get
  ARM: dts: exynos: correct wr-active property in Exynos3250 Rinato
  ARM: OMAP1: call platform_device_put() in error case in omap1_dm_timer_init()
  arm64: dts: meson-gx: Fix the SCPI DVFS node name and unit address
  arm64: dts: meson-gx: Fix Ethernet MAC address unit name
  ARM: zynq: Fix refcount leak in zynq_early_slcr_init
  ARM: OMAP2+: Fix memory leak in realtime_counter_init()
  HID: asus: use spinlock to safely schedule workers
  HID: asus: use spinlock to protect concurrent accesses
  HID: asus: Remove check for same LED brightness on set

Change-Id: Ie09175b59aef5de140e476316d94097cac7a3031
2023-04-06 14:00:28 +03:00
Greg Kroah-Hartman
24d8cfe9e4 This is the 4.19.276 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmQMnvwACgkQONu9yGCS
 aT7Wnw/8D4Y0jHf5hAU2MrVU+8aBdqdJ3CMUuqaq1/zi0yq3cWyDJo7sU5L3Tpdl
 NBDdEtdAPDVK/jZ+BCtgtwccTG8Vnt8uXsVpcKJ50hBPnWfcJ9g+asrEOnIN4MI4
 2ltYKfDxN/n/QB9j2V1s+Nj5+VT1oTJQ112ksvn354REMO14htiSZtX7Y9Av3qks
 PhHf6R+482/a59zSKM4F3HMGhcSzvPz56FT736MPmd0hvfokDYzSmNRUWx5yKgHh
 MRUmS//yc7Q24VSmrwz4PlOqolso0w2FiIxUz6i2/O/vZ/qQiZMTlanSC9cQ3gx1
 /zEGSxMRzCzTS/huPIbldSIfaLmfRY4zHpnIuKsqT6OSq4xg5BXO1p6MuUkhN9E0
 FB8Wl4xPIcqZ7BMHNYUQIp61tE57NPKzI/WiAaqgDLQPKLDsNp3YOj5aGvxFZ4lc
 beeEIhv3nD7r4+7U1j+yGejdTigOU2LlBVyjjir93pDy0RsgjoGdvzp0pnjZqsPG
 An0R/2PlGINwYX5oROPt/lr6tFbshYKB5QfcMxCJ1+MN5h4T5Nc3SJsuw/U92iH/
 MSUb6oDOsbM3FuqnHlVGJu96ttiKNO3hz6IjC1NtaWFUCTtImbsBxWNn51mJ5Svg
 +YZhzyKFya40pXMQrT3dSV4NxPnUBqI65Il2Lq1LD5zLjZC2eRg=
 =zwmc
 -----END PGP SIGNATURE-----

Merge 4.19.276 into android-4.19-stable

Changes in 4.19.276
	HID: asus: Remove check for same LED brightness on set
	HID: asus: use spinlock to protect concurrent accesses
	HID: asus: use spinlock to safely schedule workers
	ARM: OMAP2+: Fix memory leak in realtime_counter_init()
	ARM: zynq: Fix refcount leak in zynq_early_slcr_init
	arm64: dts: meson-gx: Fix Ethernet MAC address unit name
	arm64: dts: meson-gx: Fix the SCPI DVFS node name and unit address
	ARM: OMAP1: call platform_device_put() in error case in omap1_dm_timer_init()
	ARM: dts: exynos: correct wr-active property in Exynos3250 Rinato
	ARM: imx: Call ida_simple_remove() for ida_simple_get
	arm64: dts: amlogic: meson-gx: fix SCPI clock dvfs node name
	arm64: dts: meson-axg: enable SCPI
	arm64: dts: amlogic: meson-axg: fix SCPI clock dvfs node name
	arm64: dts: amlogic: meson-gx: add missing SCPI sensors compatible
	arm64: dts: amlogic: meson-gx: add missing unit address to rng node name
	arm64: dts: amlogic: meson-gxl: add missing unit address to eth-phy-mux node name
	arm64: dts: mediatek: mt7622: Add missing pwm-cells to pwm node
	blk-mq: remove stale comment for blk_mq_sched_mark_restart_hctx
	block: bio-integrity: Copy flags when bio_integrity_payload is cloned
	wifi: rsi: Fix memory leak in rsi_coex_attach()
	wifi: libertas: fix memory leak in lbs_init_adapter()
	wifi: rtl8xxxu: don't call dev_kfree_skb() under spin_lock_irqsave()
	rtlwifi: fix -Wpointer-sign warning
	wifi: rtlwifi: Fix global-out-of-bounds bug in _rtl8812ae_phy_set_txpower_limit()
	ipw2x00: switch from 'pci_' to 'dma_' API
	wifi: ipw2x00: don't call dev_kfree_skb() under spin_lock_irqsave()
	wifi: ipw2200: fix memory leak in ipw_wdev_init()
	wifi: brcmfmac: fix potential memory leak in brcmf_netdev_start_xmit()
	wifi: brcmfmac: unmap dma buffer in brcmf_msgbuf_alloc_pktid()
	wifi: libertas_tf: don't call kfree_skb() under spin_lock_irqsave()
	wifi: libertas: if_usb: don't call kfree_skb() under spin_lock_irqsave()
	wifi: libertas: main: don't call kfree_skb() under spin_lock_irqsave()
	wifi: libertas: cmdresp: don't call kfree_skb() under spin_lock_irqsave()
	wifi: wl3501_cs: don't call kfree_skb() under spin_lock_irqsave()
	ACPICA: Drop port I/O validation for some regions
	genirq: Fix the return type of kstat_cpu_irqs_sum()
	lib/mpi: Fix buffer overrun when SG is too long
	ACPICA: nsrepair: handle cases without a return value correctly
	wifi: orinoco: check return value of hermes_write_wordrec()
	wifi: ath9k: htc_hst: free skb in ath9k_htc_rx_msg() if there is no callback function
	ath9k: hif_usb: simplify if-if to if-else
	ath9k: htc: clean up statistics macros
	wifi: ath9k: hif_usb: clean up skbs if ath9k_hif_usb_rx_stream() fails
	wifi: ath9k: Fix potential stack-out-of-bounds write in ath9k_wmi_rsp_callback()
	ACPI: battery: Fix missing NUL-termination with large strings
	crypto: seqiv - Handle EBUSY correctly
	powercap: fix possible name leak in powercap_register_zone()
	net/mlx5: Enhance debug print in page allocation failure
	irqchip/alpine-msi: Fix refcount leak in alpine_msix_init_domains
	irqchip/irq-mvebu-gicp: Fix refcount leak in mvebu_gicp_probe
	Bluetooth: L2CAP: Fix potential user-after-free
	libbpf: Fix alen calculation in libbpf_nla_dump_errormsg()
	rds: rds_rm_zerocopy_callback() correct order for list_add_tail()
	crypto: rsa-pkcs1pad - Use akcipher_request_complete
	m68k: /proc/hardware should depend on PROC_FS
	RISC-V: time: initialize hrtimer based broadcast clock event device
	wifi: iwl3945: Add missing check for create_singlethread_workqueue
	wifi: iwl4965: Add missing check for create_singlethread_workqueue()
	wifi: mwifiex: fix loop iterator in mwifiex_update_ampdu_txwinsize()
	crypto: crypto4xx - Call dma_unmap_page when done
	wifi: mac80211: make rate u32 in sta_set_rate_info_rx()
	can: esd_usb: Move mislocated storage of SJA1000_ECC_SEG bits in case of a bus error
	irqchip/irq-brcmstb-l2: Set IRQ_LEVEL for level triggered interrupts
	irqchip/irq-bcm7120-l2: Set IRQ_LEVEL for level triggered interrupts
	selftest: fib_tests: Always cleanup before exit
	drm: mxsfb: DRM_MXSFB should depend on ARCH_MXS || ARCH_MXC
	drm/bridge: megachips: Fix error handling in i2c_register_driver()
	drm: Clarify definition of the DRM_BUS_FLAG_(PIXDATA|SYNC)_* macros
	drm/vc4: dpi: Add option for inverting pixel clock and output enable
	drm/vc4: dpi: Fix format mapping for RGB565
	gpu: ipu-v3: common: Add of_node_put() for reference returned by of_graph_get_port_by_id()
	drm/msm/hdmi: Add missing check for alloc_ordered_workqueue
	pinctrl: pinctrl-rockchip: Fix a bunch of kerneldoc misdemeanours
	pinctrl: rockchip: Fix refcount leak in rockchip_pinctrl_parse_groups
	ALSA: hda/ca0132: minor fix for allocation size
	drm/mipi-dsi: Fix byte order of 16-bit DCS set/get brightness
	drm/msm: use strscpy instead of strncpy
	drm/msm/dpu: Add check for pstates
	gpu: host1x: Don't skip assigning syncpoints to channels
	drm/mediatek: Drop unbalanced obj unref
	drm/mediatek: Clean dangling pointer on bind error path
	ASoC: soc-compress.c: fixup private_data on snd_soc_new_compress()
	gpio: vf610: connect GPIO label to dev name
	hwmon: (ltc2945) Handle error case in ltc2945_value_store
	scsi: aic94xx: Add missing check for dma_map_single()
	spi: bcm63xx-hsspi: fix pm_runtime
	spi: bcm63xx-hsspi: Fix multi-bit mode setting
	hwmon: (mlxreg-fan) Return zero speed for broken fan
	dm: remove flush_scheduled_work() during local_exit()
	nfsd: fix race to check ls_layouts
	cifs: Fix lost destroy smbd connection when MR allocate failed
	cifs: Fix warning and UAF when destroy the MR list
	gfs2: jdata writepage fix
	perf llvm: Fix inadvertent file creation
	perf tools: Fix auto-complete on aarch64
	sparc: allow PM configs for sparc32 COMPILE_TEST
	selftests/ftrace: Fix bash specific "==" operator
	mfd: pcf50633-adc: Fix potential memleak in pcf50633_adc_async_read()
	mtd: rawnand: sunxi: Fix the size of the last OOB region
	Input: ads7846 - don't report pressure for ads7845
	Input: ads7846 - don't check penirq immediately for 7845
	powerpc/powernv/ioda: Skip unallocated resources when mapping to PE
	clk: Honor CLK_OPS_PARENT_ENABLE in clk_core_is_enabled()
	powerpc/pseries/lparcfg: add missing RTAS retry status handling
	powerpc/rtas: make all exports GPL
	powerpc/rtas: ensure 4KB alignment for rtas_data_buf
	MIPS: vpe-mt: drop physical_memsize
	media: platform: ti: Add missing check for devm_regulator_get
	powerpc: Remove linker flag from KBUILD_AFLAGS
	media: i2c: ov772x: Fix memleak in ov772x_probe()
	media: rc: Fix use-after-free bugs caused by ene_tx_irqsim()
	media: i2c: ov7670: 0 instead of -EINVAL was returned
	media: usb: siano: Fix use after free bugs caused by do_submit_urb
	rpmsg: glink: Avoid infinite loop on intent for missing channel
	udf: Define EFSCORRUPTED error code
	ARM: dts: exynos: Use Exynos5420 compatible for the MIPI video phy
	wifi: brcmfmac: Fix potential stack-out-of-bounds in brcmf_c_preinit_dcmds()
	rcu: Suppress smp_processor_id() complaint in synchronize_rcu_expedited_wait()
	thermal: intel: Fix unsigned comparison with less than zero
	timers: Prevent union confusion from unexpected restart_syscall()
	x86/bugs: Reset speculation control settings on init
	wifi: brcmfmac: ensure CLM version is null-terminated to prevent stack-out-of-bounds
	inet: fix fast path in __inet_hash_connect()
	ACPI: Don't build ACPICA with '-Os'
	net: bcmgenet: Add a check for oversized packets
	m68k: Check syscall_trace_enter() return code
	ACPI: video: Fix Lenovo Ideapad Z570 DMI match
	net/mlx5: fw_tracer: Fix debug print
	drm/amd/display: Fix potential null-deref in dm_resume
	drm/radeon: free iio for atombios when driver shutdown
	drm/msm/dsi: Add missing check for alloc_ordered_workqueue
	docs/scripts/gdb: add necessary make scripts_gdb step
	ASoC: kirkwood: Iterate over array indexes instead of using pointer math
	regulator: max77802: Bounds check regulator id against opmode
	regulator: s5m8767: Bounds check id indexing into arrays
	pinctrl: at91: use devm_kasprintf() to avoid potential leaks
	dm thin: add cond_resched() to various workqueue loops
	dm cache: add cond_resched() to various workqueue loops
	wifi: rtl8xxxu: fixing transmisison failure for rtl8192eu
	firmware: coreboot: framebuffer: Ignore reserved pixel color bits
	rtc: pm8xxx: fix set-alarm race
	s390: discard .interp section
	s390/kprobes: fix irq mask clobbering on kprobe reenter from post_handler
	s390/kprobes: fix current_kprobe never cleared after kprobes reenter
	ARM: dts: exynos: correct HDMI phy compatible in Exynos4
	hfs: fix missing hfs_bnode_get() in __hfs_bnode_create
	fs: hfsplus: fix UAF issue in hfsplus_put_super
	f2fs: fix information leak in f2fs_move_inline_dirents()
	ocfs2: fix defrag path triggering jbd2 ASSERT
	ocfs2: fix non-auto defrag path not working issue
	udf: Truncate added extents on failed expansion
	udf: Do not bother merging very long extents
	udf: Do not update file length for failed writes to inline files
	udf: Fix file corruption when appending just after end of preallocated extent
	x86/virt: Force GIF=1 prior to disabling SVM (for reboot flows)
	x86/crash: Disable virt in core NMI crash handler to avoid double shootdown
	x86/reboot: Disable virtualization in an emergency if SVM is supported
	x86/reboot: Disable SVM, not just VMX, when stopping CPUs
	x86/kprobes: Fix __recover_optprobed_insn check optimizing logic
	x86/kprobes: Fix arch_check_optimized_kprobe check within optimized_kprobe range
	x86/microcode/amd: Remove load_microcode_amd()'s bsp parameter
	x86/microcode/AMD: Add a @cpu parameter to the reloading functions
	x86/microcode/AMD: Fix mixed steppings support
	x86/speculation: Allow enabling STIBP with legacy IBRS
	Documentation/hw-vuln: Document the interaction between IBRS and STIBP
	ima: Align ima_file_mmap() parameters with mmap_file LSM hook
	irqdomain: Fix association race
	irqdomain: Fix disassociation race
	irqdomain: Drop bogus fwspec-mapping error handling
	ALSA: ice1712: Do not left ice->gpio_mutex locked in aureon_add_controls()
	ext4: optimize ea_inode block expansion
	ext4: refuse to create ea block when umounted
	wifi: rtl8xxxu: Use a longer retry limit of 48
	wifi: cfg80211: Fix use after free for wext
	dm flakey: fix logic when corrupting a bio
	dm flakey: don't corrupt the zero page
	ARM: dts: exynos: correct TMU phandle in Exynos4
	ARM: dts: exynos: correct TMU phandle in Odroid XU
	rbd: avoid use-after-free in do_rbd_add() when rbd_dev_create() fails
	alpha: fix FEN fault handling
	mips: fix syscall_get_nr
	media: ipu3-cio2: Fix PM runtime usage_count in driver unbind
	ktest.pl: Give back console on Ctrt^C on monitor
	ktest.pl: Fix missing "end_monitor" when machine check fails
	ktest.pl: Add RUN_TIMEOUT option with default unlimited
	scsi: qla2xxx: Fix link failure in NPIV environment
	scsi: qla2xxx: Fix erroneous link down
	scsi: ses: Don't attach if enclosure has no components
	scsi: ses: Fix slab-out-of-bounds in ses_enclosure_data_process()
	scsi: ses: Fix possible addl_desc_ptr out-of-bounds accesses
	scsi: ses: Fix possible desc_ptr out-of-bounds accesses
	scsi: ses: Fix slab-out-of-bounds in ses_intf_remove()
	PCI: Avoid FLR for AMD FCH AHCI adapters
	drm/radeon: Fix eDP for single-display iMac11,2
	wifi: ath9k: use proper statements in conditionals
	kbuild: Port silent mode detection to future gnu make.
	net/sched: Retire tcindex classifier
	fs/jfs: fix shift exponent db_agl2size negative
	pwm: stm32-lp: fix the check on arr and cmp registers update
	um: vector: Fix memory leak in vector_config
	ubi: ensure that VID header offset + VID header size <= alloc, size
	ubifs: Rectify space budget for ubifs_symlink() if symlink is encrypted
	ubifs: Rectify space budget for ubifs_xrename()
	ubifs: Fix wrong dirty space budget for dirty inode
	ubifs: do_rename: Fix wrong space budget when target inode's nlink > 1
	ubifs: Reserve one leb for each journal head while doing budget
	ubi: Fix use-after-free when volume resizing failed
	ubi: Fix unreferenced object reported by kmemleak in ubi_resize_volume()
	ubi: Fix possible null-ptr-deref in ubi_free_volume()
	ubifs: Re-statistic cleaned znode count if commit failed
	ubifs: dirty_cow_znode: Fix memleak in error handling path
	ubifs: ubifs_writepage: Mark page dirty after writing inode failed
	ubi: Fix UAF wear-leveling entry in eraseblk_count_seq_show()
	ubi: ubi_wl_put_peb: Fix infinite loop when wear-leveling work failed
	x86: um: vdso: Add '%rcx' and '%r11' to the syscall clobber list
	watchdog: at91sam9_wdt: use devm_request_irq to avoid missing free_irq() in error path
	watchdog: Fix kmemleak in watchdog_cdev_register
	watchdog: pcwd_usb: Fix attempting to access uninitialized memory
	netfilter: ctnetlink: fix possible refcount leak in ctnetlink_create_conntrack()
	net: fix __dev_kfree_skb_any() vs drop monitor
	9p/xen: fix version parsing
	9p/xen: fix connection sequence
	9p/rdma: unmap receive dma buffer in rdma_request()/post_recv()
	nfc: fix memory leak of se_io context in nfc_genl_se_io
	ARM: dts: spear320-hmi: correct STMPE GPIO compatible
	tcp: tcp_check_req() can be called from process context
	vc_screen: modify vcs_size() handling in vcs_read()
	scsi: ipr: Work around fortify-string warning
	thermal: intel: quark_dts: fix error pointer dereference
	tracing: Add NULL checks for buffer in ring_buffer_free_read_page()
	firmware/efi sysfb_efi: Add quirk for Lenovo IdeaPad Duet 3
	media: uvcvideo: Handle cameras with invalid descriptors
	media: uvcvideo: Handle errors from calls to usb_string
	media: uvcvideo: Silence memcpy() run-time false positive warnings
	tty: fix out-of-bounds access in tty_driver_lookup_tty()
	tty: serial: fsl_lpuart: disable the CTS when send break signal
	mei: bus-fixup:upon error print return values of send and receive
	tools/iio/iio_utils:fix memory leak
	iio: accel: mma9551_core: Prevent uninitialized variable in mma9551_read_status_word()
	iio: accel: mma9551_core: Prevent uninitialized variable in mma9551_read_config_word()
	usb: host: xhci: mvebu: Iterate over array indexes instead of using pointer math
	USB: ene_usb6250: Allocate enough memory for full object
	usb: uvc: Enumerate valid values for color matching
	phy: rockchip-typec: Fix unsigned comparison with less than zero
	Bluetooth: hci_sock: purge socket queues in the destruct() callback
	s390/maccess: add no DAT mode to kernel_write
	s390/setup: init jump labels before command line parsing
	tcp: Fix listen() regression in 4.19.270
	media: uvcvideo: Provide sync and async uvc_ctrl_status_event
	media: uvcvideo: Fix race condition with usb_kill_urb
	f2fs: fix cgroup writeback accounting with fs-layer encryption
	thermal: intel: powerclamp: Fix cur_state for multi package system
	Linux 4.19.276

Change-Id: Iaca469bb6e616eafeac4e834dad816acc2fe0f34
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-03-12 15:41:32 +00:00
Herbert Xu
463dbc99d9 lib/mpi: Fix buffer overrun when SG is too long
[ Upstream commit 7361d1bc307b926cbca214ab67b641123c2d6357 ]

The helper mpi_read_raw_from_sgl sets the number of entries in
the SG list according to nbytes.  However, if the last entry
in the SG list contains more data than nbytes, then it may overrun
the buffer because it only allocates enough memory for nbytes.

Fixes: 2d4d1eea54 ("lib/mpi: Add mpi sgl helpers")
Reported-by: Roberto Sassu <roberto.sassu@huaweicloud.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Reviewed-by: Eric Biggers <ebiggers@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-03-11 16:31:35 +01:00
Michael Bestas
d911a7f189
Merge tag 'ASB-2023-03-05_4.19-stable' of https://android.googlesource.com/kernel/common into android13-4.19-kona
https://source.android.com/docs/security/bulletin/2023-03-01
CVE-2021-33655

* tag 'ASB-2023-03-05_4.19-stable' of https://android.googlesource.com/kernel/common:
  Linux 4.19.275
  USB: core: Don't hold device lock while reading the "descriptors" sysfs file
  USB: serial: option: add support for VW/Skoda "Carstick LTE"
  dmaengine: sh: rcar-dmac: Check for error num after dma_set_max_seg_size
  vc_screen: don't clobber return value in vcs_read
  net: Remove WARN_ON_ONCE(sk->sk_forward_alloc) from sk_stream_kill_queues().
  IB/hfi1: Assign npages earlier
  btrfs: send: limit number of clones and allocated memory size
  ACPI: NFIT: fix a potential deadlock during NFIT teardown
  ARM: dts: rockchip: add power-domains property to dp node on rk3288
  UPSTREAM: selinux: check return value of sel_make_avc_files
  UPSTREAM: lib/test_meminit: destroy cache in kmem_cache_alloc_bulk() test
  UPSTREAM: wireguard: ratelimiter: use kvcalloc() instead of kvzalloc()
  UPSTREAM: wireguard: receive: drop handshakes if queue lock is contended
  UPSTREAM: wireguard: receive: use ring buffer for incoming handshakes
  UPSTREAM: wireguard: device: reset peer src endpoint when netns exits
  UPSTREAM: wireguard: selftests: actually test for routing loops
  UPSTREAM: kasan: fix tag for large allocations when using CONFIG_SLAB
  UPSTREAM: usb: musb: select GENERIC_PHY instead of depending on it
  UPSTREAM: driver core: Reject pointless SYNC_STATE_ONLY device links
  BACKPORT: PM: EM: Fix inefficient states detection
  UPSTREAM: cfg80211: scan: fix RCU in cfg80211_add_nontrans_list()
  UPSTREAM: thermal/core: Fix thermal_cooling_device_register() prototype
  UPSTREAM: PM: EM: Increase energy calculation precision
  UPSTREAM: lib/test_stackinit: Fix static initializer test
  BACKPORT: userfaultfd: do not untag user pointers
  UPSTREAM: net/xfrm/compat: Copy xfrm_spdattr_type_t atributes
  UPSTREAM: sched/uclamp: Ignore max aggregation if rq is idle
  UPSTREAM: net: xfrm: fix memory leak in xfrm_user_rcv_msg
  UPSTREAM: f2fs: Advertise encrypted casefolding in sysfs
  UPSTREAM: fuse: ignore PG_workingset after stealing
  BACKPORT: loop: Fix missing discard support when using LOOP_CONFIGURE
  BACKPORT: nvmem: core: add a missing of_node_put
  UPSTREAM: usb: typec: mux: Fix copy-paste mistake in typec_mux_match
  Linux 4.19.274
  bpf: add missing header file include
  ext4: Fix function prototype mismatch for ext4_feat_ktype
  wifi: mwifiex: Add missing compatible string for SD8787
  uaccess: Add speculation barrier to copy_from_user()
  mac80211: mesh: embedd mesh_paths and mpp_paths into ieee80211_if_mesh
  drm/i915/gvt: fix double free bug in split_2MB_gtt_entry
  alarmtimer: Prevent starvation by small intervals and SIG_IGN
  powerpc: dts: t208x: Disable 10G on MAC1 and MAC2
  can: kvaser_usb: hydra: help gcc-13 to figure out cmd_len
  random: always mix cycle counter in add_latent_entropy()
  powerpc: dts: t208x: Mark MAC1 and MAC2 as 10G
  wifi: rtl8xxxu: gen2: Turn on the rate control
  BACKPORT: fscrypt: fix derivation of SipHash keys on big endian CPUs
  UPSTREAM: wireguard: allowedips: free empty intermediate nodes when removing single node
  BACKPORT: wireguard: allowedips: allocate nodes in kmem_cache
  Linux 4.19.273
  net: phy: meson-gxl: Add generic dummy stubs for MMD register access
  nilfs2: fix underflow in second superblock position calculations
  kvm: initialize all of the kvm_debugregs structure before sending it to userspace
  i40e: Add checking for null for nlmsg_find_attr()
  ipv6: Fix tcp socket connection with DSCP.
  ipv6: Fix datagram socket connection with DSCP.
  net: mpls: fix stale pointer if allocation fails during device rename
  net: stmmac: Restrict warning on disabling DMA store and fwd mode
  bnxt_en: Fix mqprio and XDP ring checking logic
  net: stmmac: fix order of dwmac5 FlexPPS parametrization sequence
  net/usb: kalmia: Don't pass act_len in usb_bulk_msg error path
  dccp/tcp: Avoid negative sk_forward_alloc by ipv6_pinfo.pktoptions.
  net: bgmac: fix BCM5358 support by setting correct flags
  i40e: add double of VLAN header when computing the max MTU
  revert "squashfs: harden sanity check in squashfs_read_xattr_id_table"
  hugetlb: check for undefined shift on 32 bit architectures
  ALSA: hda/realtek - fixed wrong gpio assigned
  ALSA: hda/conexant: add a new hda codec SN6180
  mmc: sdio: fix possible resource leaks in some error paths
  Revert "x86/fpu: Use _Alignof to avoid undefined behavior in TYPE_ALIGN"
  netfilter: nft_tproxy: restrict to prerouting hook
  aio: fix mremap after fork null-deref
  nvme-fc: fix a missing queue put in nvmet_fc_ls_create_association
  net/rose: Fix to not accept on connected socket
  tools/virtio: fix the vringh test for virtio ring changes
  ASoC: cs42l56: fix DT probe
  migrate: hugetlb: check for hugetlb shared PMD in node migration
  bpf: Always return target ifindex in bpf_fib_lookup
  arm64: dts: meson-axg: Make mmc host controller interrupts level-sensitive
  arm64: dts: meson-gx: Make mmc host controller interrupts level-sensitive
  riscv: Fixup race condition on PG_dcache_clean in flush_icache_pte
  usb: typec: altmodes/displayport: Fix probe pin assign check
  usb: core: add quirk for Alcor Link AK9563 smartcard reader
  net: USB: Fix wrong-direction WARNING in plusb.c
  pinctrl: intel: Restore the pins that used to be in Direct IRQ mode
  pinctrl: intel: Convert unsigned to unsigned int
  pinctrl: single: fix potential NULL dereference
  pinctrl: aspeed: Fix confusing types in return value
  ALSA: pci: lx6464es: fix a debug loop
  selftests: forwarding: lib: quote the sysctl values
  rds: rds_rm_zerocopy_callback() use list_first_entry()
  net: phy: meson-gxl: use MMD access dummy stubs for GXL, internal PHY
  net: phy: meson-gxl: add g12a support
  net: phy: add macros for PHYID matching
  IB/hfi1: Restore allocated resources on failed copyout
  ALSA: emux: Avoid potential array out-of-bound in snd_emux_xg_control()
  btrfs: limit device extents to the device size
  iio:adc:twl6030: Enable measurement of VAC
  thermal: intel: int340x: Add locking to int340x_thermal_get_trip_type()
  serial: 8250_dma: Fix DMA Rx rearm race
  serial: 8250_dma: Fix DMA Rx completion race
  Squashfs: fix handling and sanity checking of xattr_ids count
  mm/swapfile: add cond_resched() in get_swap_pages()
  mm: hugetlb: proc: check for hugetlb shared PMD in /proc/PID/smaps
  riscv: disable generation of unwind tables
  parisc: Wire up PTRACE_GETREGS/PTRACE_SETREGS for compat case
  parisc: Fix return code of pdc_iodc_print()
  iio:adc:twl6030: Enable measurements of VUSB, VBAT and others
  iio: adc: berlin2-adc: Add missing of_node_put() in error path
  iio: hid: fix the retval in accel_3d_capture_sample
  efi: Accept version 2 of memory attributes table
  watchdog: diag288_wdt: fix __diag288() inline assembly
  watchdog: diag288_wdt: do not use stack buffers for hardware data
  fbcon: Check font dimension limits
  thermal: intel: int340x: Protect trip temperature from concurrent updates
  KVM: x86/vmx: Do not skip segment attributes if unusable bit is set
  KVM: VMX: Move caching of MSR_IA32_XSS to hardware_setup()
  KVM: VMX: Move VMX specific files to a "vmx" subdirectory
  nVMX x86: Check VMX-preemption timer controls on vmentry of L2 guests
  Input: i8042 - add Clevo PCX0DX to i8042 quirk table
  Input: i8042 - add TUXEDO devices to i8042 quirk tables
  Input: i8042 - merge quirk tables
  Input: i8042 - move __initconst to fix code styling warning
  vc_screen: move load of struct vc_data pointer in vcs_read() to avoid UAF
  usb: gadget: f_fs: Fix unbalanced spinlock in __ffs_ep0_queue_wait
  usb: dwc3: qcom: enable vbus override when in OTG dr-mode
  usb: dwc3: dwc3-qcom: Fix typo in the dwc3 vbus override API
  iio: adc: stm32-dfsdm: fill module aliases
  net/x25: Fix to not accept on connected socket
  i2c: rk3x: fix a bunch of kernel-doc warnings
  scsi: iscsi_tcp: Fix UAF during login when accessing the shost ipaddress
  scsi: target: core: Fix warning on RT kernels
  net: openvswitch: fix flow memory leak in ovs_flow_cmd_new
  ata: libata: Fix sata_down_spd_limit() when no link speed is reported
  squashfs: harden sanity check in squashfs_read_xattr_id_table
  netrom: Fix use-after-free caused by accept on already connected socket
  ALSA: hda/via: Avoid potential array out-of-bound in add_secret_dac_path()
  bus: sunxi-rsb: Fix error handling in sunxi_rsb_init()
  firewire: fix memory leak for payload of request subaction to IEC 61883-1 FCP region
  UPSTREAM: wireguard: allowedips: remove nodes in O(1)
  UPSTREAM: wireguard: allowedips: initialize list head in selftest
  UPSTREAM: wireguard: use synchronize_net rather than synchronize_rcu
  UPSTREAM: wireguard: do not use -O3
  UPSTREAM: wireguard: selftests: make sure rp_filter is disabled on vethc
  BACKPORT: wireguard: selftests: remove old conntrack kconfig value
  BACKPORT: usb: typec: mux: Fix matching with typec_altmode_desc
  UPSTREAM: sched/uclamp: Fix locking around cpu_util_update_eff()
  UPSTREAM: sched/uclamp: Fix wrong implementation of cpu.uclamp.min
  UPSTREAM: usb: musb: Fix an error message
  UPSTREAM: arm64: doc: Add brk/mmap/mremap() to the Tagged Address ABI Exceptions
  BACKPORT: selinux: add proper NULL termination to the secclass_map permissions
  UPSTREAM: crypto: arm/curve25519 - Move '.fpu' after '.arch'
  UPSTREAM: libnvdimm/region: Fix nvdimm_has_flush() to handle ND_REGION_ASYNC
  UPSTREAM: of: property: fw_devlink: do not link ".*,nr-gpios"
  UPSTREAM: xfrm/compat: Cleanup WARN()s that can be user-triggered
  UPSTREAM: wireguard: selftests: test multiple parallel streams
  UPSTREAM: crypto: mips: add poly1305-core.S to .gitignore
  BACKPORT: arm64: kasan: fix page_alloc tagging with DEBUG_VIRTUAL
  UPSTREAM: crypto: mips/poly1305 - enable for all MIPS processors
  UPSTREAM: kbuild: do not include include/config/auto.conf from adjust_autoksyms.sh
  UPSTREAM: wireguard: kconfig: use arm chacha even with no neon
  UPSTREAM: wireguard: queueing: get rid of per-peer ring buffers
  UPSTREAM: wireguard: device: do not generate ICMP for non-IP packets
  BACKPORT: mac80211_hwsim: notify wmediumd of used MAC addresses
  BACKPORT: mac80211_hwsim: add concurrent channels scanning support over virtio
  BACKPORT: perf_event_open: switch to copy_struct_from_user()
  BACKPORT: sched_setattr: switch to copy_struct_from_user()

 Conflicts:
	kernel/power/energy_model.c
	net/wireless/scan.c

Change-Id: I55c29a161fd214642259ddfb19fb749a416babb2
2023-03-07 19:31:08 +02:00
Andrey Konovalov
3d49d9ddf0 UPSTREAM: lib/test_meminit: destroy cache in kmem_cache_alloc_bulk() test
Make do_kmem_cache_size_bulk() destroy the cache it creates.

Bug: 254441685
Link: https://lkml.kernel.org/r/aced20a94bf04159a139f0846e41d38a1537debb.1640018297.git.andreyknvl@google.com
Fixes: 03a9349ac0e0 ("lib/test_meminit: add a kmem_cache_alloc_bulk() test")
Signed-off-by: Andrey Konovalov <andreyknvl@google.com>
Reviewed-by: Marco Elver <elver@google.com>
Cc: Alexander Potapenko <glider@google.com>
Cc: Dmitry Vyukov <dvyukov@google.com>
Cc: Andrey Ryabinin <ryabinin.a.a@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit e073e5ef90298d2d6e5e7f04b545a0815e92110c)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: Id5993c1add928905d9effef52d9c36aa2e7c5e42
2023-03-01 14:08:00 +00:00
Kees Cook
e201f7dc0b UPSTREAM: lib/test_stackinit: Fix static initializer test
The static initializer test got accidentally converted to a dynamic
initializer. Fix this and retain the giant padding hole without using
an aligned struct member.

Bug: 254441685
Fixes: 50ceaa95ea09 ("lib: Introduce test_stackinit module")
Cc: Ard Biesheuvel <ardb@kernel.org>
Cc: stable@vger.kernel.org
Signed-off-by: Kees Cook <keescook@chromium.org>
Link: https://lore.kernel.org/r/20210723221933.3431999-2-keescook@chromium.org
(cherry picked from commit f9398f15605a50110bf570aaa361163a85113dd1)
Signed-off-by: Lee Jones <joneslee@google.com>
Change-Id: I4829d109eed03f2d16f1d544fe0f94296d3c8927
2023-03-01 12:09:29 +00:00
Greg Kroah-Hartman
6af002b301 This is the 4.19.274 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmP56E4ACgkQONu9yGCS
 aT5TjQ//fjhU2pECdzAsZ0GCnXqMfVgdUQtvPfzU16cHqhDcAZORuX4bgn1SuGZq
 VOWjfTED2zYtd/dffM2J0eGssSQk2nYtCiMPhweeOITyP4bIGWpScYGuO7rdJFRY
 8AKUscMnIvH5y7cA8oMH/O/LlBD2JWEc5xBfSym99JICTrFOKvKKxWTbHPJS40/m
 Ppw4UVX229/ZgeSvrxIQ3ZCn74R90Wb60ZohaXp7uN9nIE1gjkk75l8Whhoaf4L6
 JuTZBdun1lY/nM/mhvw2efOzHEiobJZZkROKWHjJuEzTq0ZodV8wUaY/SSgBgDLh
 UDgzohjW/2pcEdlHCY+zkhTD4+UR7WlRP8y4XlMtMAtlg099Y6L1iO3aGTBdt/Ix
 Lkfk+CbjhWWqYIiatnT2XM6XJsqCLJVOueGbAUlTpctyzYdogqUML3Mp89t2EATV
 coqmVXULB7wYXn7iU5hDGtidmYB6fyADyT3SCezTEZ9u/Cqity3QRniWMyJxttfr
 RjLjAZx9GqFVVjAhaoOkc+PtEcxgZvimcu0t/9fixg551ssVfPJdikA4QrOlLoDK
 THZc8zJb8xeJakG+r/PMsJadwRuarTXQiNy2/HTrkn23APkxLZribG3ZKjpGL6t7
 S7q0ZU5pXtQhvqooFC4iS+l3QXZirSP97i6szQmWcmjcOPiViSg=
 =HaZo
 -----END PGP SIGNATURE-----

Merge 4.19.274 into android-4.19-stable

Changes in 4.19.274
	wifi: rtl8xxxu: gen2: Turn on the rate control
	powerpc: dts: t208x: Mark MAC1 and MAC2 as 10G
	random: always mix cycle counter in add_latent_entropy()
	can: kvaser_usb: hydra: help gcc-13 to figure out cmd_len
	powerpc: dts: t208x: Disable 10G on MAC1 and MAC2
	alarmtimer: Prevent starvation by small intervals and SIG_IGN
	drm/i915/gvt: fix double free bug in split_2MB_gtt_entry
	mac80211: mesh: embedd mesh_paths and mpp_paths into ieee80211_if_mesh
	uaccess: Add speculation barrier to copy_from_user()
	wifi: mwifiex: Add missing compatible string for SD8787
	ext4: Fix function prototype mismatch for ext4_feat_ktype
	bpf: add missing header file include
	Linux 4.19.274

Change-Id: Ibf649340dee25d21c329d09a1f19454dfd2e5e7f
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-02-25 15:35:59 +00:00
Dave Hansen
f8e54da1c7 uaccess: Add speculation barrier to copy_from_user()
commit 74e19ef0ff8061ef55957c3abd71614ef0f42f47 upstream.

The results of "access_ok()" can be mis-speculated.  The result is that
you can end speculatively:

	if (access_ok(from, size))
		// Right here

even for bad from/size combinations.  On first glance, it would be ideal
to just add a speculation barrier to "access_ok()" so that its results
can never be mis-speculated.

But there are lots of system calls just doing access_ok() via
"copy_to_user()" and friends (example: fstat() and friends).  Those are
generally not problematic because they do not _consume_ data from
userspace other than the pointer.  They are also very quick and common
system calls that should not be needlessly slowed down.

"copy_from_user()" on the other hand uses a user-controller pointer and
is frequently followed up with code that might affect caches.  Take
something like this:

	if (!copy_from_user(&kernelvar, uptr, size))
		do_something_with(kernelvar);

If userspace passes in an evil 'uptr' that *actually* points to a kernel
addresses, and then do_something_with() has cache (or other)
side-effects, it could allow userspace to infer kernel data values.

Add a barrier to the common copy_from_user() code to prevent
mis-speculated values which happen after the copy.

Also add a stub for architectures that do not define barrier_nospec().
This makes the macro usable in generic code.

Since the barrier is now usable in generic code, the x86 #ifdef in the
BPF code can also go away.

Reported-by: Jordy Zomer <jordyzomer@google.com>
Suggested-by: Linus Torvalds <torvalds@linuxfoundation.org>
Signed-off-by: Dave Hansen <dave.hansen@linux.intel.com>
Reviewed-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>   # BPF bits
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-02-25 11:51:51 +01:00
Michael Bestas
ad51bd9fc5
Merge tag 'ASB-2023-02-05_4.19-stable' of https://android.googlesource.com/kernel/common into android13-4.19-kona
https://source.android.com/docs/security/bulletin/2023-02-01
CVE-2022-39189
CVE-2022-39842
CVE-2022-41222
CVE-2023-20937
CVE-2023-20938
CVE-2022-0850

* tag 'ASB-2023-02-05_4.19-stable' of https://android.googlesource.com/kernel/common:
  Linux 4.19.272
  usb: host: xhci-plat: add wakeup entry at sysfs
  ipv6: ensure sane device mtu in tunnels
  exit: Use READ_ONCE() for all oops/warn limit reads
  docs: Fix path paste-o for /sys/kernel/warn_count
  panic: Expose "warn_count" to sysfs
  panic: Introduce warn_limit
  panic: Consolidate open-coded panic_on_warn checks
  exit: Allow oops_limit to be disabled
  exit: Expose "oops_count" to sysfs
  exit: Put an upper limit on how often we can oops
  ia64: make IA64_MCA_RECOVERY bool instead of tristate
  h8300: Fix build errors from do_exit() to make_task_dead() transition
  hexagon: Fix function name in die()
  objtool: Add a missing comma to avoid string concatenation
  exit: Add and use make_task_dead.
  panic: unset panic_on_warn inside panic()
  sysctl: add a new register_sysctl_init() interface
  dmaengine: imx-sdma: Fix a possible memory leak in sdma_transfer_init
  ARM: dts: imx: Fix pca9547 i2c-mux node name
  x86/entry/64: Add instruction suffix to SYSRET
  x86/asm: Fix an assembler warning with current binutils
  drm/i915/display: fix compiler warning about array overrun
  x86/i8259: Mark legacy PIC interrupts with IRQ_LEVEL
  Revert "Input: synaptics - switch touchpad on HP Laptop 15-da3001TU to RMI mode"
  net/tg3: resolve deadlock in tg3_reset_task() during EEH
  net: ravb: Fix possible hang if RIS2_QFF1 happen
  sctp: fail if no bound addresses can be used for a given scope
  netrom: Fix use-after-free of a listening socket.
  netfilter: conntrack: fix vtag checks for ABORT/SHUTDOWN_COMPLETE
  ipv4: prevent potential spectre v1 gadget in ip_metrics_convert()
  netlink: annotate data races around sk_state
  netlink: annotate data races around dst_portid and dst_group
  netlink: annotate data races around nlk->portid
  netlink: remove hash::nelems check in netlink_insert
  netfilter: nft_set_rbtree: skip elements in transaction from garbage collection
  net: fix UaF in netns ops registration error path
  EDAC/device: Respect any driver-supplied workqueue polling value
  ARM: 9280/1: mm: fix warning on phys_addr_t to void pointer assignment
  cifs: Fix oops due to uncleared server->smbd_conn in reconnect
  smbd: Make upper layer decide when to destroy the transport
  trace_events_hist: add check for return value of 'create_hist_field'
  tracing: Make sure trace_printk() can output as soon as it can be used
  module: Don't wait for GOING modules
  scsi: hpsa: Fix allocation size for scsi_host_alloc()
  Bluetooth: hci_sync: cancel cmd_timer if hci_open failed
  fs: reiserfs: remove useless new_opts in reiserfs_remount
  perf env: Do not return pointers to local variables
  block: fix and cleanup bio_check_ro
  netfilter: conntrack: do not renew entry stuck in tcp SYN_SENT state
  w1: fix WARNING after calling w1_process()
  w1: fix deadloop in __w1_remove_master_device()
  tcp: avoid the lookup process failing to get sk in ehash table
  dmaengine: xilinx_dma: call of_node_put() when breaking out of for_each_child_of_node()
  dmaengine: xilinx_dma: Fix devm_platform_ioremap_resource error handling
  dmaengine: xilinx_dma: program hardware supported buffer length
  dmaengine: xilinx_dma: commonize DMA copy size calculation
  HID: betop: check shape of output reports
  net: macb: fix PTP TX timestamp failure due to packet padding
  dmaengine: Fix double increment of client_count in dma_chan_get()
  net: mlx5: eliminate anonymous module_init & module_exit
  usb: gadget: f_fs: Ensure ep0req is dequeued before free_request
  usb: gadget: f_fs: Prevent race during ffs_ep0_queue_wait
  HID: check empty report_list in hid_validate_values()
  net: mdio: validate parameter addr in mdiobus_get_phy()
  net: usb: sr9700: Handle negative len
  wifi: rndis_wlan: Prevent buffer overflow in rndis_query_oid
  net: nfc: Fix use-after-free in local_cleanup()
  phy: rockchip-inno-usb2: Fix missing clk_disable_unprepare() in rockchip_usb2phy_power_on()
  bpf: Fix pointer-leak due to insufficient speculative store bypass mitigation
  amd-xgbe: Delay AN timeout during KR training
  amd-xgbe: TX Flow Ctrl Registers are h/w ver dependent
  affs: initialize fsdata in affs_truncate()
  IB/hfi1: Fix expected receive setup error exit issues
  IB/hfi1: Reserve user expected TIDs
  IB/hfi1: Reject a zero-length user expected buffer
  tomoyo: fix broken dependency on *.conf.default
  EDAC/highbank: Fix memory leak in highbank_mc_probe()
  HID: intel_ish-hid: Add check for ishtp_dma_tx_map
  ARM: dts: imx6qdl-gw560x: Remove incorrect 'uart-has-rtscts'
  UPSTREAM: tcp: fix tcp_rmem documentation
  UPSTREAM: nvmem: core: skip child nodes not matching binding
  BACKPORT: nvmem: core: Fix a resource leak on error in nvmem_add_cells_from_of()
  UPSTREAM: sched/eas: Don't update misfit status if the task is pinned
  BACKPORT: arm64: link with -z norelro for LLD or aarch64-elf
  UPSTREAM: driver: core: Fix list corruption after device_del()
  UPSTREAM: coresight: tmc-etr: Fix barrier packet insertion for perf buffer
  UPSTREAM: f2fs: fix double free of unicode map
  BACKPORT: net: xfrm: fix memory leak in xfrm_user_policy()
  UPSTREAM: xfrm/compat: Don't allocate memory with __GFP_ZERO
  UPSTREAM: xfrm/compat: memset(0) 64-bit padding at right place
  UPSTREAM: xfrm/compat: Translate by copying XFRMA_UNSPEC attribute
  UPSTREAM: scsi: ufs: Fix missing brace warning for old compilers
  UPSTREAM: arm64: vdso32: make vdso32 install conditional
  UPSTREAM: loop: unset GENHD_FL_NO_PART_SCAN on LOOP_CONFIGURE
  BACKPORT: drm/virtio: fix missing dma_fence_put() in virtio_gpu_execbuffer_ioctl()
  BACKPORT: sched/uclamp: Protect uclamp fast path code with static key
  BACKPORT: sched/uclamp: Fix initialization of struct uclamp_rq
  UPSTREAM: coresight: etmv4: Fix CPU power management setup in probe() function
  UPSTREAM: arm64: vdso: Add --eh-frame-hdr to ldflags
  BACKPORT: arm64: vdso: Add '-Bsymbolic' to ldflags
  UPSTREAM: drm/virtio: fix a wait_event condition
  BACKPORT: sched/topology: Don't try to build empty sched domains
  BACKPORT: binder: prevent UAF read in print_binder_transaction_log_entry()
  BACKPORT: copy_process(): don't use ksys_close() on cleanups
  BACKPORT: arm64: vdso: Remove unnecessary asm-offsets.c definitions
  UPSTREAM: locking/lockdep, cpu/hotplug: Annotate AP thread
  Revert "xhci: Add a flag to disable USB3 lpm on a xhci root port level."
  BACKPORT: mac80211_hwsim: add concurrent channels scanning support over virtio
  BACKPORT: mac80211_hwsim: add frame transmission support over virtio This allows communication with external entities.
  BACKPORT: driver core: Skip unnecessary work when device doesn't have sync_state()
  Linux 4.19.271
  x86/fpu: Use _Alignof to avoid undefined behavior in TYPE_ALIGN
  Revert "ext4: generalize extents status tree search functions"
  Revert "ext4: add new pending reservation mechanism"
  Revert "ext4: fix reserved cluster accounting at delayed write time"
  Revert "ext4: fix delayed allocation bug in ext4_clu_mapped for bigalloc + inline"
  gsmi: fix null-deref in gsmi_get_variable
  serial: atmel: fix incorrect baudrate setup
  serial: pch_uart: Pass correct sg to dma_unmap_sg()
  usb-storage: apply IGNORE_UAS only for HIKSEMI MD202 on RTL9210
  usb: gadget: f_ncm: fix potential NULL ptr deref in ncm_bitrate()
  usb: gadget: g_webcam: Send color matching descriptor per frame
  usb: typec: altmodes/displayport: Fix pin assignment calculation
  usb: typec: altmodes/displayport: Add pin assignment helper
  usb: host: ehci-fsl: Fix module alias
  USB: serial: cp210x: add SCALANCE LPE-9000 device id
  cifs: do not include page data when checking signature
  mmc: sunxi-mmc: Fix clock refcount imbalance during unbind
  comedi: adv_pci1760: Fix PWM instruction handling
  usb: core: hub: disable autosuspend for TI TUSB8041
  USB: misc: iowarrior: fix up header size for USB_DEVICE_ID_CODEMERCS_IOW100
  USB: serial: option: add Quectel EM05CN modem
  USB: serial: option: add Quectel EM05CN (SG) modem
  USB: serial: option: add Quectel EC200U modem
  USB: serial: option: add Quectel EM05-G (RS) modem
  USB: serial: option: add Quectel EM05-G (CS) modem
  USB: serial: option: add Quectel EM05-G (GR) modem
  prlimit: do_prlimit needs to have a speculation check
  xhci: Add a flag to disable USB3 lpm on a xhci root port level.
  xhci: Fix null pointer dereference when host dies
  usb: xhci: Check endpoint is valid before dereferencing it
  xhci-pci: set the dma max_seg_size
  nilfs2: fix general protection fault in nilfs_btree_insert()
  Add exception protection processing for vd in axi_chan_handle_err function
  f2fs: let's avoid panic if extent_tree is not created
  RDMA/srp: Move large values to a new enum for gcc13
  net/ethtool/ioctl: return -EOPNOTSUPP if we have no phy stats
  pNFS/filelayout: Fix coalescing test for single DS
  ANDROID: usb: f_accessory: Check buffer size when initialised via composite
  Linux 4.19.270
  serial: tegra: Change lower tolerance baud rate limit for tegra20 and tegra30
  serial: tegra: Only print FIFO error message when an error occurs
  tty: serial: tegra: Handle RX transfer in PIO mode if DMA wasn't started
  Revert "usb: ulpi: defer ulpi_register on ulpi_read_id timeout"
  efi: fix NULL-deref in init error path
  arm64: cmpxchg_double*: hazard against entire exchange variable
  drm/virtio: Fix GEM handle creation UAF
  x86/resctrl: Fix task CLOSID/RMID update race
  x86/resctrl: Use task_curr() instead of task_struct->on_cpu to prevent unnecessary IPI
  iommu/mediatek-v1: Fix an error handling path in mtk_iommu_v1_probe()
  iommu/mediatek-v1: Add error handle for mtk_iommu_probe
  net/mlx5: Fix ptp max frequency adjustment range
  net/mlx5: Rename ptp clock info
  nfc: pn533: Wait for out_urb's completion in pn533_usb_send_frame()
  hvc/xen: lock console list traversal
  regulator: da9211: Use irq handler when ready
  EDAC/device: Fix period calculation in edac_device_reset_delay_period()
  x86/boot: Avoid using Intel mnemonics in AT&T syntax asm
  netfilter: ipset: Fix overflow before widen in the bitmap_ip_create() function.
  ext4: fix delayed allocation bug in ext4_clu_mapped for bigalloc + inline
  ext4: fix reserved cluster accounting at delayed write time
  ext4: add new pending reservation mechanism
  ext4: generalize extents status tree search functions
  ext4: fix uninititialized value in 'ext4_evict_inode'
  ext4: fix use-after-free in ext4_orphan_cleanup
  ext4: lost matching-pair of trace in ext4_truncate
  ext4: fix bug_on in __es_tree_search caused by bad quota inode
  quota: Factor out setup of quota inode
  usb: ulpi: defer ulpi_register on ulpi_read_id timeout
  kest.pl: Fix grub2 menu handling for rebooting
  ktest.pl: Fix incorrect reboot for grub2bls
  ktest: introduce grub2bls REBOOT_TYPE option
  ktest: cleanup get_grub_index
  ktest: introduce _get_grub_index
  ktest: Add support for meta characters in GRUB_MENU
  ALSA: hda/hdmi: fix failures at PCM open on Intel ICL and later
  wifi: wilc1000: sdio: fix module autoloading
  ipv6: raw: Deduct extension header length in rawv6_push_pending_frames
  platform/x86: sony-laptop: Don't turn off 0x153 keyboard backlight during probe
  cifs: Fix uninitialized memory read for smb311 posix symlink create
  ALSA: pcm: Move rwsem lock inside snd_ctl_elem_read to prevent UAF
  net/ulp: prevent ULP without clone op from entering the LISTEN status
  s390/percpu: add READ_ONCE() to arch_this_cpu_to_op_simple()
  perf auxtrace: Fix address filter duplicate symbol selection
  docs: Fix the docs build with Sphinx 6.0
  net: sched: disallow noqueue for qdisc classes
  driver core: Fix bus_type.match() error handling in __driver_attach()
  parisc: Align parisc MADV_XXX constants with all other architectures
  mbcache: Avoid nesting of cache->c_list_lock under bit locks
  hfs/hfsplus: avoid WARN_ON() for sanity check, use proper error handling
  hfs/hfsplus: use WARN_ON for sanity check
  ext4: don't allow journal inode to have encrypt flag
  riscv: uaccess: fix type of 0 variable on error in get_user()
  nfsd: fix handling of readdir in v4root vs. mount upcall timeout
  x86/bugs: Flush IBP in ib_prctl_set()
  ASoC: Intel: bytcr_rt5640: Add quirk for the Advantech MICA-071 tablet
  udf: Fix extension of the last extent in the file
  caif: fix memory leak in cfctrl_linkup_request()
  usb: rndis_host: Secure rndis_query check against int overflow
  net: sched: atm: dont intepret cls results when asked to drop
  RDMA/mlx5: Fix validation of max_rd_atomic caps for DC
  net: phy: xgmiitorgmii: Fix refcount leak in xgmiitorgmii_probe
  net: amd-xgbe: add missed tasklet_kill
  nfc: Fix potential resource leaks
  qlcnic: prevent ->dcb use-after-free on qlcnic_dcb_enable() failure
  bpf: pull before calling skb_postpull_rcsum()
  SUNRPC: ensure the matching upcall is in-flight upon downcall
  ext4: fix deadlock due to mbcache entry corruption
  mbcache: automatically delete entries from cache on freeing
  ext4: fix race when reusing xattr blocks
  ext4: unindent codeblock in ext4_xattr_block_set()
  ext4: remove EA inode entry from mbcache on inode eviction
  mbcache: add functions to delete entry if unused
  mbcache: don't reclaim used entries
  ext4: use kmemdup() to replace kmalloc + memcpy
  ext4: correct inconsistent error msg in nojournal mode
  ext4: goto right label 'failed_mount3a'
  driver core: Set deferred_probe_timeout to a longer default if CONFIG_MODULES is set
  ravb: Fix "failed to switch device to config mode" message during unbind
  perf probe: Fix to get the DW_AT_decl_file and DW_AT_call_file as unsinged data
  perf probe: Use dwarf_attr_integrate as generic DWARF attr accessor
  dm thin: resume even if in FAIL mode
  media: s5p-mfc: Fix in register read and write for H264
  media: s5p-mfc: Clear workbit to handle error condition
  media: s5p-mfc: Fix to handle reference queue during finishing
  btrfs: replace strncpy() with strscpy()
  btrfs: send: avoid unnecessary backref lookups when finding clone source
  ext4: allocate extended attribute value in vmalloc area
  ext4: avoid unaccounted block allocation when expanding inode
  ext4: initialize quota before expanding inode in setproject ioctl
  ext4: fix inode leak in ext4_xattr_inode_create() on an error path
  ext4: avoid BUG_ON when creating xattrs
  ext4: fix error code return to user-space in ext4_get_branch()
  ext4: fix corruption when online resizing a 1K bigalloc fs
  ext4: init quota for 'old.inode' in 'ext4_rename'
  ext4: fix bug_on in __es_tree_search caused by bad boot loader inode
  ext4: add helper to check quota inums
  ext4: fix undefined behavior in bit shift for ext4_check_flag_values
  ext4: add inode table check in __ext4_get_inode_loc to aovid possible infinite loop
  drm/vmwgfx: Validate the box size for the snooped cursor
  drm/connector: send hotplug uevent on connector cleanup
  device_cgroup: Roll back to original exceptions after copy failure
  parisc: led: Fix potential null-ptr-deref in start_task()
  iommu/amd: Fix ivrs_acpihid cmdline parsing code
  crypto: n2 - add missing hash statesize
  PCI/sysfs: Fix double free in error path
  PCI: Fix pci_device_is_present() for VFs by checking PF
  ipmi: fix use after free in _ipmi_destroy_user()
  ima: Fix a potential NULL pointer access in ima_restore_measurement_list
  ipmi: fix long wait in unload when IPMI disconnect
  md/bitmap: Fix bitmap chunk size overflow issues
  cifs: fix confusing debug message
  media: dvb-core: Fix UAF due to refcount races at releasing
  media: dvb-core: Fix double free in dvb_register_device()
  ARM: 9256/1: NWFPE: avoid compiler-generated __aeabi_uldivmod
  tracing: Fix infinite loop in tracing_read_pipe on overflowed print_trace_line
  x86/microcode/intel: Do not retry microcode reloading on the APs
  dm cache: set needs_check flag after aborting metadata
  dm cache: Fix UAF in destroy()
  dm thin: Fix UAF in run_timer_softirq()
  dm thin: Use last transaction's pmd->root when commit failed
  dm cache: Fix ABBA deadlock between shrink_slab and dm_cache_metadata_abort
  binfmt: Fix error return code in load_elf_fdpic_binary()
  binfmt: Move install_exec_creds after setup_new_exec to match binfmt_elf
  selftests: Use optional USERCFLAGS and USERLDFLAGS
  ARM: ux500: do not directly dereference __iomem
  ktest.pl minconfig: Unset configs instead of just removing them
  soc: qcom: Select REMAP_MMIO for LLCC driver
  media: stv0288: use explicitly signed char
  SUNRPC: Don't leak netobj memory when gss_read_proxy_verf() fails
  tpm: tpm_tis: Add the missed acpi_put_table() to fix memory leak
  tpm: tpm_crb: Add the missed acpi_put_table() to fix memory leak
  mmc: vub300: fix warning - do not call blocking ops when !TASK_RUNNING
  md: fix a crash in mempool_free
  pnode: terminate at peers of source
  ALSA: line6: fix stack overflow in line6_midi_transmit
  ALSA: line6: correct midi status byte when receiving data from podxt
  ovl: Use ovl mounter's fsuid and fsgid in ovl_link()
  hfsplus: fix bug causing custom uid and gid being unable to be assigned with mount
  HID: plantronics: Additional PIDs for double volume key presses quirk
  powerpc/rtas: avoid scheduling in rtas_os_term()
  powerpc/rtas: avoid device tree lookups in rtas_os_term()
  ata: ahci: Fix PCS quirk application for suspend
  media: dvbdev: fix refcnt bug
  media: dvbdev: fix build warning due to comments
  gcov: add support for checksum field
  iio: adc: ad_sigma_delta: do not use internal iio_dev lock
  reiserfs: Add missing calls to reiserfs_security_free()
  HID: wacom: Ensure bootloader PID is usable in hidraw mode
  usb: dwc3: core: defer probe on ulpi_read_id timeout
  pstore: Make sure CONFIG_PSTORE_PMSG selects CONFIG_RT_MUTEXES
  pstore: Switch pmsg_lock to an rt_mutex to avoid priority inversion
  ASoC: rt5670: Remove unbalanced pm_runtime_put()
  ASoC: rockchip: spdif: Add missing clk_disable_unprepare() in rk_spdif_runtime_resume()
  ASoC: wm8994: Fix potential deadlock
  ASoC: rockchip: pdm: Add missing clk_disable_unprepare() in rockchip_pdm_runtime_resume()
  ASoC: mediatek: mt8173-rt5650-rt5514: fix refcount leak in mt8173_rt5650_rt5514_dev_probe()
  orangefs: Fix kmemleak in orangefs_prepare_debugfs_help_string()
  drm/sti: Fix return type of sti_{dvo,hda,hdmi}_connector_mode_valid()
  drm/fsl-dcu: Fix return type of fsl_dcu_drm_connector_mode_valid()
  clk: st: Fix memory leak in st_of_quadfs_setup()
  media: si470x: Fix use-after-free in si470x_int_in_callback()
  mmc: f-sdh30: Add quirks for broken timeout clock capability
  regulator: core: fix use_count leakage when handling boot-on
  blk-mq: fix possible memleak when register 'hctx' failed
  media: dvb-usb: fix memory leak in dvb_usb_adapter_init()
  media: dvbdev: adopts refcnt to avoid UAF
  media: dvb-frontends: fix leak of memory fw
  ppp: associate skb with a device at tx
  mrp: introduce active flags to prevent UAF when applicant uninit
  md/raid1: stop mdx_raid1 thread when raid1 array run failed
  drivers/md/md-bitmap: check the return value of md_bitmap_get_counter()
  drm/sti: Use drm_mode_copy()
  s390/lcs: Fix return type of lcs_start_xmit()
  s390/netiucv: Fix return type of netiucv_tx()
  s390/ctcm: Fix return type of ctc{mp,}m_tx()
  drm/amdgpu: Fix type of second parameter in trans_msg() callback
  igb: Do not free q_vector unless new one was allocated
  wifi: brcmfmac: Fix potential shift-out-of-bounds in brcmf_fw_alloc_request()
  hamradio: baycom_epp: Fix return type of baycom_send_packet()
  net: ethernet: ti: Fix return type of netcp_ndo_start_xmit()
  bpf: make sure skb->len != 0 when redirecting to a tunneling device
  ipmi: fix memleak when unload ipmi driver
  ASoC: codecs: rt298: Add quirk for KBL-R RVP platform
  wifi: ar5523: Fix use-after-free on ar5523_cmd() timed out
  wifi: ath9k: verify the expected usb_endpoints are present
  hfs: fix OOB Read in __hfs_brec_find
  acct: fix potential integer overflow in encode_comp_t()
  nilfs2: fix shift-out-of-bounds/overflow in nilfs_sb2_bad_offset()
  ACPICA: Fix error code path in acpi_ds_call_control_method()
  fs: jfs: fix shift-out-of-bounds in dbDiscardAG
  udf: Avoid double brelse() in udf_rename()
  fs: jfs: fix shift-out-of-bounds in dbAllocAG
  binfmt_misc: fix shift-out-of-bounds in check_special_flags
  net: stream: purge sk_error_queue in sk_stream_kill_queues()
  myri10ge: Fix an error handling path in myri10ge_probe()
  rxrpc: Fix missing unlock in rxrpc_do_sendmsg()
  net_sched: reject TCF_EM_SIMPLE case for complex ematch module
  skbuff: Account for tail adjustment during pull operations
  openvswitch: Fix flow lookup to use unmasked key
  rtc: mxc_v2: Add missing clk_disable_unprepare()
  r6040: Fix kmemleak in probe and remove
  nfc: pn533: Clear nfc_target before being used
  mISDN: hfcmulti: don't call dev_kfree_skb/kfree_skb() under spin_lock_irqsave()
  mISDN: hfcpci: don't call dev_kfree_skb/kfree_skb() under spin_lock_irqsave()
  mISDN: hfcsusb: don't call dev_kfree_skb/kfree_skb() under spin_lock_irqsave()
  nfsd: under NFSv4.1, fix double svc_xprt_put on rpc_create failure
  rtc: st-lpc: Add missing clk_disable_unprepare in st_rtc_probe()
  selftests/powerpc: Fix resource leaks
  powerpc/hv-gpci: Fix hv_gpci event list
  powerpc/83xx/mpc832x_rdb: call platform_device_put() in error case in of_fsl_spi_probe()
  powerpc/perf: callchain validate kernel stack pointer bounds
  powerpc/xive: add missing iounmap() in error path in xive_spapr_populate_irq_data()
  cxl: Fix refcount leak in cxl_calc_capp_routing
  powerpc/52xx: Fix a resource leak in an error handling path
  macintosh/macio-adb: check the return value of ioremap()
  macintosh: fix possible memory leak in macio_add_one_device()
  iommu/fsl_pamu: Fix resource leak in fsl_pamu_probe()
  iommu/amd: Fix pci device refcount leak in ppr_notifier()
  rtc: snvs: Allow a time difference on clock register read
  include/uapi/linux/swab: Fix potentially missing __always_inline
  HSI: omap_ssi_core: Fix error handling in ssi_init()
  perf symbol: correction while adjusting symbol
  power: supply: fix residue sysfs file in error handle route of __power_supply_register()
  HSI: omap_ssi_core: fix possible memory leak in ssi_probe()
  HSI: omap_ssi_core: fix unbalanced pm_runtime_disable()
  fbdev: uvesafb: Fixes an error handling path in uvesafb_probe()
  fbdev: vermilion: decrease reference count in error path
  fbdev: via: Fix error in via_core_init()
  fbdev: pm2fb: fix missing pci_disable_device()
  fbdev: ssd1307fb: Drop optional dependency
  samples: vfio-mdev: Fix missing pci_disable_device() in mdpy_fb_probe()
  tracing/hist: Fix issue of losting command info in error_log
  usb: storage: Add check for kcalloc
  i2c: ismt: Fix an out-of-bounds bug in ismt_access()
  vme: Fix error not catched in fake_init()
  staging: rtl8192e: Fix potential use-after-free in rtllib_rx_Monitor()
  staging: rtl8192u: Fix use after free in ieee80211_rx()
  i2c: pxa-pci: fix missing pci_disable_device() on error in ce4100_i2c_probe
  chardev: fix error handling in cdev_device_add()
  mcb: mcb-parse: fix error handing in chameleon_parse_gdd()
  drivers: mcb: fix resource leak in mcb_probe()
  usb: gadget: f_hid: fix refcount leak on error path
  usb: gadget: f_hid: fix f_hidg lifetime vs cdev
  usb: gadget: f_hid: optional SETUP/SET_REPORT mode
  cxl: fix possible null-ptr-deref in cxl_pci_init_afu|adapter()
  cxl: fix possible null-ptr-deref in cxl_guest_init_afu|adapter()
  misc: sgi-gru: fix use-after-free error in gru_set_context_option, gru_fault and gru_handle_user_call_os
  misc: tifm: fix possible memory leak in tifm_7xx1_switch_media()
  test_firmware: fix memory leak in test_firmware_init()
  serial: sunsab: Fix error handling in sunsab_init()
  serial: altera_uart: fix locking in polling mode
  tty: serial: altera_uart_{r,t}x_chars() need only uart_port
  tty: serial: clean up stop-tx part in altera_uart_tx_chars()
  serial: pch: Fix PCI device refcount leak in pch_request_dma()
  serial: pl011: Do not clear RX FIFO & RX interrupt in unthrottle.
  serial: amba-pl011: avoid SBSA UART accessing DMACR register
  usb: typec: Check for ops->exit instead of ops->enter in altmode_exit
  staging: vme_user: Fix possible UAF in tsi148_dma_list_add
  usb: fotg210-udc: Fix ages old endianness issues
  uio: uio_dmem_genirq: Fix deadlock between irq config and handling
  uio: uio_dmem_genirq: Fix missing unlock in irq configuration
  vfio: platform: Do not pass return buffer to ACPI _RST method
  class: fix possible memory leak in __class_register()
  serial: tegra: Read DMA status before terminating
  tty: serial: tegra: Activate RX DMA transfer by request
  serial: tegra: Add PIO mode support
  serial: tegra: report clk rate errors
  serial: tegra: add support to adjust baud rate
  serial: tegra: add support to use 8 bytes trigger
  serial: tegra: set maximum num of uart ports to 8
  serial: tegra: check for FIFO mode enabled status
  serial: tegra: avoid reg access when clk disabled
  drivers: dio: fix possible memory leak in dio_init()
  IB/IPoIB: Fix queue count inconsistency for PKEY child interfaces
  hwrng: geode - Fix PCI device refcount leak
  hwrng: amd - Fix PCI device refcount leak
  crypto: img-hash - Fix variable dereferenced before check 'hdev->req'
  orangefs: Fix sysfs not cleanup when dev init failed
  RDMA/hfi1: Fix error return code in parse_platform_config()
  scsi: snic: Fix possible UAF in snic_tgt_create()
  scsi: fcoe: Fix transport not deattached when fcoe_if_init() fails
  scsi: ipr: Fix WARNING in ipr_init()
  scsi: fcoe: Fix possible name leak when device_register() fails
  scsi: hpsa: Fix possible memory leak in hpsa_add_sas_device()
  scsi: hpsa: Fix error handling in hpsa_add_sas_host()
  crypto: tcrypt - Fix multibuffer skcipher speed test mem leak
  scsi: hpsa: Fix possible memory leak in hpsa_init_one()
  scsi: hpsa: use local workqueues instead of system workqueues
  RDMA/rxe: Fix NULL-ptr-deref in rxe_qp_do_cleanup() when socket create failed
  crypto: ccree - Make cc_debugfs_global_fini() available for module init function
  RDMA/hfi: Decrease PCI device reference count in error path
  PCI: Check for alloc failure in pci_request_irq()
  scsi: scsi_debug: Fix a warning in resp_write_scat()
  RDMA/nldev: Return "-EAGAIN" if the cm_id isn't from expected port
  f2fs: fix normal discard process
  apparmor: Fix abi check to include v8 abi
  apparmor: fix lockdep warning when removing a namespace
  apparmor: fix a memleak in multi_transaction_new()
  stmmac: fix potential division by 0
  Bluetooth: RFCOMM: don't call kfree_skb() under spin_lock_irqsave()
  Bluetooth: hci_core: don't call kfree_skb() under spin_lock_irqsave()
  Bluetooth: hci_bcsp: don't call kfree_skb() under spin_lock_irqsave()
  Bluetooth: hci_h5: don't call kfree_skb() under spin_lock_irqsave()
  Bluetooth: hci_qca: don't call kfree_skb() under spin_lock_irqsave()
  Bluetooth: btusb: don't call kfree_skb() under spin_lock_irqsave()
  ntb_netdev: Use dev_kfree_skb_any() in interrupt context
  net: lan9303: Fix read error execution path
  net: amd-xgbe: Check only the minimum speed for active/passive cables
  net: amd-xgbe: Fix logic around active and passive cables
  net: amd: lance: don't call dev_kfree_skb() under spin_lock_irqsave()
  hamradio: don't call dev_kfree_skb() under spin_lock_irqsave()
  net: ethernet: dnet: don't call dev_kfree_skb() under spin_lock_irqsave()
  net: emaclite: don't call dev_kfree_skb() under spin_lock_irqsave()
  net: apple: bmac: don't call dev_kfree_skb() under spin_lock_irqsave()
  net: apple: mace: don't call dev_kfree_skb() under spin_lock_irqsave()
  net/tunnel: wait until all sk_user_data reader finish before releasing the sock
  net: farsync: Fix kmemleak when rmmods farsync
  ethernet: s2io: don't call dev_kfree_skb() under spin_lock_irqsave()
  drivers: net: qlcnic: Fix potential memory leak in qlcnic_sriov_init()
  net: defxx: Fix missing err handling in dfx_init()
  net: vmw_vsock: vmci: Check memcpy_from_msg()
  clk: socfpga: use clk_hw_register for a5/c5
  clk: socfpga: clk-pll: Remove unused variable 'rc'
  blktrace: Fix output non-blktrace event when blk_classic option enabled
  wifi: brcmfmac: Fix error return code in brcmf_sdio_download_firmware()
  rtl8xxxu: add enumeration for channel bandwidth
  wifi: rtl8xxxu: Add __packed to struct rtl8723bu_c2h
  clk: samsung: Fix memory leak in _samsung_clk_register_pll()
  media: coda: Add check for kmalloc
  media: coda: Add check for dcoda_iram_alloc
  media: c8sectpfe: Add of_node_put() when breaking out of loop
  mmc: mmci: fix return value check of mmc_add_host()
  mmc: wbsd: fix return value check of mmc_add_host()
  mmc: via-sdmmc: fix return value check of mmc_add_host()
  mmc: meson-gx: fix return value check of mmc_add_host()
  mmc: atmel-mci: fix return value check of mmc_add_host()
  mmc: wmt-sdmmc: fix return value check of mmc_add_host()
  mmc: vub300: fix return value check of mmc_add_host()
  mmc: toshsd: fix return value check of mmc_add_host()
  mmc: rtsx_usb_sdmmc: fix return value check of mmc_add_host()
  mmc: mxcmmc: fix return value check of mmc_add_host()
  mmc: moxart: fix return value check of mmc_add_host()
  NFSv4.x: Fail client initialisation if state manager thread can't run
  SUNRPC: Fix missing release socket in rpc_sockname()
  ALSA: mts64: fix possible null-ptr-defer in snd_mts64_interrupt
  media: saa7164: fix missing pci_disable_device()
  regulator: core: fix module refcount leak in set_supply()
  wifi: cfg80211: Fix not unregister reg_pdev when load_builtin_regdb_keys() fails
  bonding: uninitialized variable in bond_miimon_inspect()
  ASoC: pcm512x: Fix PM disable depth imbalance in pcm512x_probe
  drm/amdgpu: Fix PCI device refcount leak in amdgpu_atrm_get_bios()
  drm/radeon: Fix PCI device refcount leak in radeon_atrm_get_bios()
  ALSA: asihpi: fix missing pci_disable_device()
  NFSv4: Fix a deadlock between nfs4_open_recover_helper() and delegreturn
  NFSv4.2: Fix a memory stomp in decode_attr_security_label
  drm/tegra: Add missing clk_disable_unprepare() in tegra_dc_probe()
  media: s5p-mfc: Add variant data for MFC v7 hardware for Exynos 3250 SoC
  media: dvb-usb: az6027: fix null-ptr-deref in az6027_i2c_xfer()
  media: dvb-core: Fix ignored return value in dvb_register_frontend()
  pinctrl: pinconf-generic: add missing of_node_put()
  media: imon: fix a race condition in send_packet()
  drbd: remove call to memset before free device/resource/connection
  mtd: maps: pxa2xx-flash: fix memory leak in probe
  bonding: Export skip slave logic to function
  clk: rockchip: Fix memory leak in rockchip_clk_register_pll()
  ALSA: seq: fix undefined behavior in bit shift for SNDRV_SEQ_FILTER_USE_EVENT
  HID: hid-sensor-custom: set fixed size for custom attributes
  media: platform: exynos4-is: Fix error handling in fimc_md_init()
  media: solo6x10: fix possible memory leak in solo_sysfs_init()
  Input: elants_i2c - properly handle the reset GPIO when power is off
  mtd: lpddr2_nvm: Fix possible null-ptr-deref
  wifi: ath10k: Fix return value in ath10k_pci_init()
  ima: Fix misuse of dereference of pointer in template_desc_init_fields()
  regulator: core: fix unbalanced of node refcount in regulator_dev_lookup()
  ASoC: pxa: fix null-pointer dereference in filter()
  drm/radeon: Add the missed acpi_put_table() to fix memory leak
  net, proc: Provide PROC_FS=n fallback for proc_create_net_single_write()
  media: camss: Clean up received buffers on failed start of streaming
  wifi: rsi: Fix handling of 802.3 EAPOL frames sent via control port
  mtd: Fix device name leak when register device failed in add_mtd_device()
  media: vivid: fix compose size exceed boundary
  spi: Update reference to struct spi_controller
  can: kvaser_usb: Compare requested bittiming parameters with actual parameters in do_set_{,data}_bittiming
  can: kvaser_usb: Add struct kvaser_usb_busparams
  can: kvaser_usb_leaf: Fix bogus restart events
  can: kvaser_usb_leaf: Fix wrong CAN state after stopping
  can: kvaser_usb_leaf: Fix improved state not being reported
  can: kvaser_usb_leaf: Set Warning state even without bus errors
  can: kvaser_usb: kvaser_usb_leaf: Handle CMD_ERROR_EVENT
  can: kvaser_usb: kvaser_usb_leaf: Rename {leaf,usbcan}_cmd_error_event to {leaf,usbcan}_cmd_can_error_event
  can: kvaser_usb: kvaser_usb_leaf: Get capabilities from device
  can: kvaser_usb: do not increase tx statistics when sending error message frames
  media: i2c: ad5820: Fix error path
  pata_ipx4xx_cf: Fix unsigned comparison with less than zero
  wifi: rtl8xxxu: Fix reading the vendor of combo chips
  wifi: ath9k: hif_usb: Fix use-after-free in ath9k_hif_usb_reg_in_cb()
  wifi: ath9k: hif_usb: fix memory leak of urbs in ath9k_hif_usb_dealloc_tx_urbs()
  rapidio: devices: fix missing put_device in mport_cdev_open
  hfs: Fix OOB Write in hfs_asc2mac
  relay: fix type mismatch when allocating memory in relay_create_buf()
  eventfd: change int to __u64 in eventfd_signal() ifndef CONFIG_EVENTFD
  rapidio: fix possible UAF when kfifo_alloc() fails
  fs: sysv: Fix sysv_nblocks() returns wrong value
  MIPS: BCM63xx: Add check for NULL for clk in clk_enable
  platform/x86: mxm-wmi: fix memleak in mxm_wmi_call_mx[ds|mx]()
  PM: runtime: Do not call __rpm_callback() from rpm_idle()
  PM: runtime: Improve path in rpm_idle() when no callback
  xen/privcmd: Fix a possible warning in privcmd_ioctl_mmap_resource()
  x86/xen: Fix memory leak in xen_init_lock_cpu()
  x86/xen: Fix memory leak in xen_smp_intr_init{_pv}()
  xen/events: only register debug interrupt for 2-level events
  uprobes/x86: Allow to probe a NOP instruction with 0x66 prefix
  ACPICA: Fix use-after-free in acpi_ut_copy_ipackage_to_ipackage()
  clocksource/drivers/sh_cmt: Make sure channel clock supply is enabled
  rapidio: rio: fix possible name leak in rio_register_mport()
  rapidio: fix possible name leaks when rio_add_device() fails
  debugfs: fix error when writing negative value to atomic_t debugfs file
  lib/notifier-error-inject: fix error when writing -errno to debugfs file
  libfs: add DEFINE_SIMPLE_ATTRIBUTE_SIGNED for signed value
  cpufreq: amd_freq_sensitivity: Add missing pci_dev_put()
  irqchip: gic-pm: Use pm_runtime_resume_and_get() in gic_probe()
  perf/x86/intel/uncore: Fix reference count leak in hswep_has_limit_sbox()
  PNP: fix name memory leak in pnp_alloc_dev()
  MIPS: vpe-cmp: fix possible memory leak while module exiting
  MIPS: vpe-mt: fix possible memory leak while module exiting
  ocfs2: fix memory leak in ocfs2_stack_glue_init()
  proc: fixup uptime selftest
  timerqueue: Use rb_entry_safe() in timerqueue_getnext()
  perf: Fix possible memleak in pmu_dev_alloc()
  selftests/ftrace: event_triggers: wait longer for test_event_enable
  fs: don't audit the capability check in simple_xattr_list()
  alpha: fix syscall entry in !AUDUT_SYSCALL case
  cpuidle: dt: Return the correct numbers of parsed idle states
  tpm/tpm_crb: Fix error message in __crb_relinquish_locality()
  pstore: Avoid kcore oops by vmap()ing with VM_IOREMAP
  ARM: mmp: fix timer_read delay
  pstore/ram: Fix error return code in ramoops_probe()
  ARM: dts: turris-omnia: Add switch port 6 node
  ARM: dts: turris-omnia: Add ethernet aliases
  ARM: dts: armada-39x: Fix assigned-addresses for every PCIe Root Port
  ARM: dts: armada-38x: Fix assigned-addresses for every PCIe Root Port
  ARM: dts: armada-375: Fix assigned-addresses for every PCIe Root Port
  ARM: dts: armada-xp: Fix assigned-addresses for every PCIe Root Port
  ARM: dts: armada-370: Fix assigned-addresses for every PCIe Root Port
  ARM: dts: dove: Fix assigned-addresses for every PCIe Root Port
  arm64: dts: mediatek: mt6797: Fix 26M oscillator unit name
  arm64: dts: mt2712-evb: Fix vproc fixed regulators unit names
  arm64: dts: mt2712e: Fix unit address for pinctrl node
  arm64: dts: mt2712e: Fix unit_address_vs_reg warning for oscillators
  perf: arm_dsu: Fix hotplug callback leak in dsu_pmu_init()
  soc: ti: smartreflex: Fix PM disable depth imbalance in omap_sr_probe
  arm: dts: spear600: Fix clcd interrupt
  drivers: soc: ti: knav_qmss_queue: Mark knav_acc_firmwares as static
  ARM: dts: qcom: apq8064: fix coresight compatible
  usb: musb: remove extra check in musb_gadget_vbus_draw
  net: loopback: use NET_NAME_PREDICTABLE for name_assign_type
  Bluetooth: L2CAP: Fix u8 overflow
  igb: Initialize mailbox message for VF reset
  USB: serial: f81534: fix division by zero on line-speed change
  USB: serial: cp210x: add Kamstrup RF sniffer PIDs
  USB: serial: option: add Quectel EM05-G modem
  usb: gadget: uvc: Prevent buffer overflow in setup handler
  udf: Fix extending file within last block
  udf: Do not bother looking for prealloc extents if i_lenExtents matches i_size
  udf: Fix preallocation discarding at indirect extent boundary
  udf: Discard preallocation before extending file with a hole
  perf script python: Remove explicit shebang from tests/attr.c
  ASoC: ops: Correct bounds check for second channel on SX controls
  can: mcba_usb: Fix termination command argument
  can: sja1000: fix size of OCR_MODE_MASK define
  pinctrl: meditatek: Startup with the IRQs disabled
  ASoC: ops: Check bounds for second channel in snd_soc_put_volsw_sx()
  nfp: fix use-after-free in area_cache_get()
  block: unhash blkdev part inode when the part is deleted
  mm/khugepaged: invoke MMU notifiers in shmem/file collapse paths
  mm/khugepaged: fix GUP-fast interaction by sending IPI
  ANDROID: Add more hvc devices for virtio-console.

 Conflicts:
	drivers/base/core.c
	drivers/edac/edac_device.c
	drivers/hwtracing/coresight/coresight-etm4x.c
	drivers/net/wireless/mac80211_hwsim.c
	drivers/scsi/ufs/ufshcd-crypto.c
	drivers/usb/gadget/function/f_fs.c
	drivers/usb/gadget/function/f_hid.c

Change-Id: Ied998db07e927ccb3376a78f044df36088d9e3b8
2023-02-08 17:19:24 +02:00
Greg Kroah-Hartman
f66335a3cf This is the 4.19.270 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmPHynkACgkQONu9yGCS
 aT5AtBAAsdmYCYkmKZsRcS1EUTqdwKVN7FDILDcdMjfmrSp4ZDliaD1dUc0EmDRl
 yy+aNGCrhbuYACk9WdQsSUrUIh1dK0H5VsioB1m0cjCgifbNjsYqjYWK5ewXKUyX
 yjc+NmY1HVUFQDLnYHJxSbnB/o+nobWjts8nGuWHwQmoh7UmFe7lvMqZg753x6Bw
 wCiaC1DrU3aKHYK7IirdWgOiDiGia8DX1nX6PmLi6JTsXj+Io0i8PXKkFzANDf/p
 /rOyg7j8NOXIQPZGN0Zu88QiMWsNk7u2bOORZgtFbwo7r9BFbzXfWk/x8QxzDX1B
 iH1p02XQvBwm44xGJZKiWEY2nZdw4mpyzLXZNOL8V7vn9xhT6HDksVAPnyIkU8Dh
 wsij2r27x18VI9H7sstvAHvIyg6ihmq2E6WuC4W74tUcys7MXxCFc2DuJzMMocf0
 7LMTmx3/oUHvuM1riJ9STo9mzXbTmfNd6hnqRnFgGKiGGhOE+pX//RHfupaXRieQ
 Rq51ODFKcJdDIM7hxeyPdACYF/kso8sNEODCgQ5/+3opel1mzLdBJ1T2bV12DpQe
 ZhTsESPCVSoUAjCnC9Jje3g0u3qztClYq1faHOXtnjykn9mHmmedVwvdfJL/sOsr
 ec7NgqzM9xvMQVe4CNf0mouugaLpn2m6uQDTu+GWswRfEKuCx2Q=
 =ksam
 -----END PGP SIGNATURE-----

Merge 4.19.270 into android-4.19-stable

Changes in 4.19.270
	mm/khugepaged: fix GUP-fast interaction by sending IPI
	mm/khugepaged: invoke MMU notifiers in shmem/file collapse paths
	block: unhash blkdev part inode when the part is deleted
	nfp: fix use-after-free in area_cache_get()
	ASoC: ops: Check bounds for second channel in snd_soc_put_volsw_sx()
	pinctrl: meditatek: Startup with the IRQs disabled
	can: sja1000: fix size of OCR_MODE_MASK define
	can: mcba_usb: Fix termination command argument
	ASoC: ops: Correct bounds check for second channel on SX controls
	perf script python: Remove explicit shebang from tests/attr.c
	udf: Discard preallocation before extending file with a hole
	udf: Fix preallocation discarding at indirect extent boundary
	udf: Do not bother looking for prealloc extents if i_lenExtents matches i_size
	udf: Fix extending file within last block
	usb: gadget: uvc: Prevent buffer overflow in setup handler
	USB: serial: option: add Quectel EM05-G modem
	USB: serial: cp210x: add Kamstrup RF sniffer PIDs
	USB: serial: f81534: fix division by zero on line-speed change
	igb: Initialize mailbox message for VF reset
	Bluetooth: L2CAP: Fix u8 overflow
	net: loopback: use NET_NAME_PREDICTABLE for name_assign_type
	usb: musb: remove extra check in musb_gadget_vbus_draw
	ARM: dts: qcom: apq8064: fix coresight compatible
	drivers: soc: ti: knav_qmss_queue: Mark knav_acc_firmwares as static
	arm: dts: spear600: Fix clcd interrupt
	soc: ti: smartreflex: Fix PM disable depth imbalance in omap_sr_probe
	perf: arm_dsu: Fix hotplug callback leak in dsu_pmu_init()
	arm64: dts: mt2712e: Fix unit_address_vs_reg warning for oscillators
	arm64: dts: mt2712e: Fix unit address for pinctrl node
	arm64: dts: mt2712-evb: Fix vproc fixed regulators unit names
	arm64: dts: mediatek: mt6797: Fix 26M oscillator unit name
	ARM: dts: dove: Fix assigned-addresses for every PCIe Root Port
	ARM: dts: armada-370: Fix assigned-addresses for every PCIe Root Port
	ARM: dts: armada-xp: Fix assigned-addresses for every PCIe Root Port
	ARM: dts: armada-375: Fix assigned-addresses for every PCIe Root Port
	ARM: dts: armada-38x: Fix assigned-addresses for every PCIe Root Port
	ARM: dts: armada-39x: Fix assigned-addresses for every PCIe Root Port
	ARM: dts: turris-omnia: Add ethernet aliases
	ARM: dts: turris-omnia: Add switch port 6 node
	pstore/ram: Fix error return code in ramoops_probe()
	ARM: mmp: fix timer_read delay
	pstore: Avoid kcore oops by vmap()ing with VM_IOREMAP
	tpm/tpm_crb: Fix error message in __crb_relinquish_locality()
	cpuidle: dt: Return the correct numbers of parsed idle states
	alpha: fix syscall entry in !AUDUT_SYSCALL case
	fs: don't audit the capability check in simple_xattr_list()
	selftests/ftrace: event_triggers: wait longer for test_event_enable
	perf: Fix possible memleak in pmu_dev_alloc()
	timerqueue: Use rb_entry_safe() in timerqueue_getnext()
	proc: fixup uptime selftest
	ocfs2: fix memory leak in ocfs2_stack_glue_init()
	MIPS: vpe-mt: fix possible memory leak while module exiting
	MIPS: vpe-cmp: fix possible memory leak while module exiting
	PNP: fix name memory leak in pnp_alloc_dev()
	perf/x86/intel/uncore: Fix reference count leak in hswep_has_limit_sbox()
	irqchip: gic-pm: Use pm_runtime_resume_and_get() in gic_probe()
	cpufreq: amd_freq_sensitivity: Add missing pci_dev_put()
	libfs: add DEFINE_SIMPLE_ATTRIBUTE_SIGNED for signed value
	lib/notifier-error-inject: fix error when writing -errno to debugfs file
	debugfs: fix error when writing negative value to atomic_t debugfs file
	rapidio: fix possible name leaks when rio_add_device() fails
	rapidio: rio: fix possible name leak in rio_register_mport()
	clocksource/drivers/sh_cmt: Make sure channel clock supply is enabled
	ACPICA: Fix use-after-free in acpi_ut_copy_ipackage_to_ipackage()
	uprobes/x86: Allow to probe a NOP instruction with 0x66 prefix
	xen/events: only register debug interrupt for 2-level events
	x86/xen: Fix memory leak in xen_smp_intr_init{_pv}()
	x86/xen: Fix memory leak in xen_init_lock_cpu()
	xen/privcmd: Fix a possible warning in privcmd_ioctl_mmap_resource()
	PM: runtime: Improve path in rpm_idle() when no callback
	PM: runtime: Do not call __rpm_callback() from rpm_idle()
	platform/x86: mxm-wmi: fix memleak in mxm_wmi_call_mx[ds|mx]()
	MIPS: BCM63xx: Add check for NULL for clk in clk_enable
	fs: sysv: Fix sysv_nblocks() returns wrong value
	rapidio: fix possible UAF when kfifo_alloc() fails
	eventfd: change int to __u64 in eventfd_signal() ifndef CONFIG_EVENTFD
	relay: fix type mismatch when allocating memory in relay_create_buf()
	hfs: Fix OOB Write in hfs_asc2mac
	rapidio: devices: fix missing put_device in mport_cdev_open
	wifi: ath9k: hif_usb: fix memory leak of urbs in ath9k_hif_usb_dealloc_tx_urbs()
	wifi: ath9k: hif_usb: Fix use-after-free in ath9k_hif_usb_reg_in_cb()
	wifi: rtl8xxxu: Fix reading the vendor of combo chips
	pata_ipx4xx_cf: Fix unsigned comparison with less than zero
	media: i2c: ad5820: Fix error path
	can: kvaser_usb: do not increase tx statistics when sending error message frames
	can: kvaser_usb: kvaser_usb_leaf: Get capabilities from device
	can: kvaser_usb: kvaser_usb_leaf: Rename {leaf,usbcan}_cmd_error_event to {leaf,usbcan}_cmd_can_error_event
	can: kvaser_usb: kvaser_usb_leaf: Handle CMD_ERROR_EVENT
	can: kvaser_usb_leaf: Set Warning state even without bus errors
	can: kvaser_usb_leaf: Fix improved state not being reported
	can: kvaser_usb_leaf: Fix wrong CAN state after stopping
	can: kvaser_usb_leaf: Fix bogus restart events
	can: kvaser_usb: Add struct kvaser_usb_busparams
	can: kvaser_usb: Compare requested bittiming parameters with actual parameters in do_set_{,data}_bittiming
	spi: Update reference to struct spi_controller
	media: vivid: fix compose size exceed boundary
	mtd: Fix device name leak when register device failed in add_mtd_device()
	wifi: rsi: Fix handling of 802.3 EAPOL frames sent via control port
	media: camss: Clean up received buffers on failed start of streaming
	net, proc: Provide PROC_FS=n fallback for proc_create_net_single_write()
	drm/radeon: Add the missed acpi_put_table() to fix memory leak
	ASoC: pxa: fix null-pointer dereference in filter()
	regulator: core: fix unbalanced of node refcount in regulator_dev_lookup()
	ima: Fix misuse of dereference of pointer in template_desc_init_fields()
	wifi: ath10k: Fix return value in ath10k_pci_init()
	mtd: lpddr2_nvm: Fix possible null-ptr-deref
	Input: elants_i2c - properly handle the reset GPIO when power is off
	media: solo6x10: fix possible memory leak in solo_sysfs_init()
	media: platform: exynos4-is: Fix error handling in fimc_md_init()
	HID: hid-sensor-custom: set fixed size for custom attributes
	ALSA: seq: fix undefined behavior in bit shift for SNDRV_SEQ_FILTER_USE_EVENT
	clk: rockchip: Fix memory leak in rockchip_clk_register_pll()
	bonding: Export skip slave logic to function
	mtd: maps: pxa2xx-flash: fix memory leak in probe
	drbd: remove call to memset before free device/resource/connection
	media: imon: fix a race condition in send_packet()
	pinctrl: pinconf-generic: add missing of_node_put()
	media: dvb-core: Fix ignored return value in dvb_register_frontend()
	media: dvb-usb: az6027: fix null-ptr-deref in az6027_i2c_xfer()
	media: s5p-mfc: Add variant data for MFC v7 hardware for Exynos 3250 SoC
	drm/tegra: Add missing clk_disable_unprepare() in tegra_dc_probe()
	NFSv4.2: Fix a memory stomp in decode_attr_security_label
	NFSv4: Fix a deadlock between nfs4_open_recover_helper() and delegreturn
	ALSA: asihpi: fix missing pci_disable_device()
	drm/radeon: Fix PCI device refcount leak in radeon_atrm_get_bios()
	drm/amdgpu: Fix PCI device refcount leak in amdgpu_atrm_get_bios()
	ASoC: pcm512x: Fix PM disable depth imbalance in pcm512x_probe
	bonding: uninitialized variable in bond_miimon_inspect()
	wifi: cfg80211: Fix not unregister reg_pdev when load_builtin_regdb_keys() fails
	regulator: core: fix module refcount leak in set_supply()
	media: saa7164: fix missing pci_disable_device()
	ALSA: mts64: fix possible null-ptr-defer in snd_mts64_interrupt
	SUNRPC: Fix missing release socket in rpc_sockname()
	NFSv4.x: Fail client initialisation if state manager thread can't run
	mmc: moxart: fix return value check of mmc_add_host()
	mmc: mxcmmc: fix return value check of mmc_add_host()
	mmc: rtsx_usb_sdmmc: fix return value check of mmc_add_host()
	mmc: toshsd: fix return value check of mmc_add_host()
	mmc: vub300: fix return value check of mmc_add_host()
	mmc: wmt-sdmmc: fix return value check of mmc_add_host()
	mmc: atmel-mci: fix return value check of mmc_add_host()
	mmc: meson-gx: fix return value check of mmc_add_host()
	mmc: via-sdmmc: fix return value check of mmc_add_host()
	mmc: wbsd: fix return value check of mmc_add_host()
	mmc: mmci: fix return value check of mmc_add_host()
	media: c8sectpfe: Add of_node_put() when breaking out of loop
	media: coda: Add check for dcoda_iram_alloc
	media: coda: Add check for kmalloc
	clk: samsung: Fix memory leak in _samsung_clk_register_pll()
	wifi: rtl8xxxu: Add __packed to struct rtl8723bu_c2h
	rtl8xxxu: add enumeration for channel bandwidth
	wifi: brcmfmac: Fix error return code in brcmf_sdio_download_firmware()
	blktrace: Fix output non-blktrace event when blk_classic option enabled
	clk: socfpga: clk-pll: Remove unused variable 'rc'
	clk: socfpga: use clk_hw_register for a5/c5
	net: vmw_vsock: vmci: Check memcpy_from_msg()
	net: defxx: Fix missing err handling in dfx_init()
	drivers: net: qlcnic: Fix potential memory leak in qlcnic_sriov_init()
	ethernet: s2io: don't call dev_kfree_skb() under spin_lock_irqsave()
	net: farsync: Fix kmemleak when rmmods farsync
	net/tunnel: wait until all sk_user_data reader finish before releasing the sock
	net: apple: mace: don't call dev_kfree_skb() under spin_lock_irqsave()
	net: apple: bmac: don't call dev_kfree_skb() under spin_lock_irqsave()
	net: emaclite: don't call dev_kfree_skb() under spin_lock_irqsave()
	net: ethernet: dnet: don't call dev_kfree_skb() under spin_lock_irqsave()
	hamradio: don't call dev_kfree_skb() under spin_lock_irqsave()
	net: amd: lance: don't call dev_kfree_skb() under spin_lock_irqsave()
	net: amd-xgbe: Fix logic around active and passive cables
	net: amd-xgbe: Check only the minimum speed for active/passive cables
	net: lan9303: Fix read error execution path
	ntb_netdev: Use dev_kfree_skb_any() in interrupt context
	Bluetooth: btusb: don't call kfree_skb() under spin_lock_irqsave()
	Bluetooth: hci_qca: don't call kfree_skb() under spin_lock_irqsave()
	Bluetooth: hci_h5: don't call kfree_skb() under spin_lock_irqsave()
	Bluetooth: hci_bcsp: don't call kfree_skb() under spin_lock_irqsave()
	Bluetooth: hci_core: don't call kfree_skb() under spin_lock_irqsave()
	Bluetooth: RFCOMM: don't call kfree_skb() under spin_lock_irqsave()
	stmmac: fix potential division by 0
	apparmor: fix a memleak in multi_transaction_new()
	apparmor: fix lockdep warning when removing a namespace
	apparmor: Fix abi check to include v8 abi
	f2fs: fix normal discard process
	RDMA/nldev: Return "-EAGAIN" if the cm_id isn't from expected port
	scsi: scsi_debug: Fix a warning in resp_write_scat()
	PCI: Check for alloc failure in pci_request_irq()
	RDMA/hfi: Decrease PCI device reference count in error path
	crypto: ccree - Make cc_debugfs_global_fini() available for module init function
	RDMA/rxe: Fix NULL-ptr-deref in rxe_qp_do_cleanup() when socket create failed
	scsi: hpsa: use local workqueues instead of system workqueues
	scsi: hpsa: Fix possible memory leak in hpsa_init_one()
	crypto: tcrypt - Fix multibuffer skcipher speed test mem leak
	scsi: hpsa: Fix error handling in hpsa_add_sas_host()
	scsi: hpsa: Fix possible memory leak in hpsa_add_sas_device()
	scsi: fcoe: Fix possible name leak when device_register() fails
	scsi: ipr: Fix WARNING in ipr_init()
	scsi: fcoe: Fix transport not deattached when fcoe_if_init() fails
	scsi: snic: Fix possible UAF in snic_tgt_create()
	RDMA/hfi1: Fix error return code in parse_platform_config()
	orangefs: Fix sysfs not cleanup when dev init failed
	crypto: img-hash - Fix variable dereferenced before check 'hdev->req'
	hwrng: amd - Fix PCI device refcount leak
	hwrng: geode - Fix PCI device refcount leak
	IB/IPoIB: Fix queue count inconsistency for PKEY child interfaces
	drivers: dio: fix possible memory leak in dio_init()
	serial: tegra: avoid reg access when clk disabled
	serial: tegra: check for FIFO mode enabled status
	serial: tegra: set maximum num of uart ports to 8
	serial: tegra: add support to use 8 bytes trigger
	serial: tegra: add support to adjust baud rate
	serial: tegra: report clk rate errors
	serial: tegra: Add PIO mode support
	tty: serial: tegra: Activate RX DMA transfer by request
	serial: tegra: Read DMA status before terminating
	class: fix possible memory leak in __class_register()
	vfio: platform: Do not pass return buffer to ACPI _RST method
	uio: uio_dmem_genirq: Fix missing unlock in irq configuration
	uio: uio_dmem_genirq: Fix deadlock between irq config and handling
	usb: fotg210-udc: Fix ages old endianness issues
	staging: vme_user: Fix possible UAF in tsi148_dma_list_add
	usb: typec: Check for ops->exit instead of ops->enter in altmode_exit
	serial: amba-pl011: avoid SBSA UART accessing DMACR register
	serial: pl011: Do not clear RX FIFO & RX interrupt in unthrottle.
	serial: pch: Fix PCI device refcount leak in pch_request_dma()
	tty: serial: clean up stop-tx part in altera_uart_tx_chars()
	tty: serial: altera_uart_{r,t}x_chars() need only uart_port
	serial: altera_uart: fix locking in polling mode
	serial: sunsab: Fix error handling in sunsab_init()
	test_firmware: fix memory leak in test_firmware_init()
	misc: tifm: fix possible memory leak in tifm_7xx1_switch_media()
	misc: sgi-gru: fix use-after-free error in gru_set_context_option, gru_fault and gru_handle_user_call_os
	cxl: fix possible null-ptr-deref in cxl_guest_init_afu|adapter()
	cxl: fix possible null-ptr-deref in cxl_pci_init_afu|adapter()
	usb: gadget: f_hid: optional SETUP/SET_REPORT mode
	usb: gadget: f_hid: fix f_hidg lifetime vs cdev
	usb: gadget: f_hid: fix refcount leak on error path
	drivers: mcb: fix resource leak in mcb_probe()
	mcb: mcb-parse: fix error handing in chameleon_parse_gdd()
	chardev: fix error handling in cdev_device_add()
	i2c: pxa-pci: fix missing pci_disable_device() on error in ce4100_i2c_probe
	staging: rtl8192u: Fix use after free in ieee80211_rx()
	staging: rtl8192e: Fix potential use-after-free in rtllib_rx_Monitor()
	vme: Fix error not catched in fake_init()
	i2c: ismt: Fix an out-of-bounds bug in ismt_access()
	usb: storage: Add check for kcalloc
	tracing/hist: Fix issue of losting command info in error_log
	samples: vfio-mdev: Fix missing pci_disable_device() in mdpy_fb_probe()
	fbdev: ssd1307fb: Drop optional dependency
	fbdev: pm2fb: fix missing pci_disable_device()
	fbdev: via: Fix error in via_core_init()
	fbdev: vermilion: decrease reference count in error path
	fbdev: uvesafb: Fixes an error handling path in uvesafb_probe()
	HSI: omap_ssi_core: fix unbalanced pm_runtime_disable()
	HSI: omap_ssi_core: fix possible memory leak in ssi_probe()
	power: supply: fix residue sysfs file in error handle route of __power_supply_register()
	perf symbol: correction while adjusting symbol
	HSI: omap_ssi_core: Fix error handling in ssi_init()
	include/uapi/linux/swab: Fix potentially missing __always_inline
	rtc: snvs: Allow a time difference on clock register read
	iommu/amd: Fix pci device refcount leak in ppr_notifier()
	iommu/fsl_pamu: Fix resource leak in fsl_pamu_probe()
	macintosh: fix possible memory leak in macio_add_one_device()
	macintosh/macio-adb: check the return value of ioremap()
	powerpc/52xx: Fix a resource leak in an error handling path
	cxl: Fix refcount leak in cxl_calc_capp_routing
	powerpc/xive: add missing iounmap() in error path in xive_spapr_populate_irq_data()
	powerpc/perf: callchain validate kernel stack pointer bounds
	powerpc/83xx/mpc832x_rdb: call platform_device_put() in error case in of_fsl_spi_probe()
	powerpc/hv-gpci: Fix hv_gpci event list
	selftests/powerpc: Fix resource leaks
	rtc: st-lpc: Add missing clk_disable_unprepare in st_rtc_probe()
	nfsd: under NFSv4.1, fix double svc_xprt_put on rpc_create failure
	mISDN: hfcsusb: don't call dev_kfree_skb/kfree_skb() under spin_lock_irqsave()
	mISDN: hfcpci: don't call dev_kfree_skb/kfree_skb() under spin_lock_irqsave()
	mISDN: hfcmulti: don't call dev_kfree_skb/kfree_skb() under spin_lock_irqsave()
	nfc: pn533: Clear nfc_target before being used
	r6040: Fix kmemleak in probe and remove
	rtc: mxc_v2: Add missing clk_disable_unprepare()
	openvswitch: Fix flow lookup to use unmasked key
	skbuff: Account for tail adjustment during pull operations
	net_sched: reject TCF_EM_SIMPLE case for complex ematch module
	rxrpc: Fix missing unlock in rxrpc_do_sendmsg()
	myri10ge: Fix an error handling path in myri10ge_probe()
	net: stream: purge sk_error_queue in sk_stream_kill_queues()
	binfmt_misc: fix shift-out-of-bounds in check_special_flags
	fs: jfs: fix shift-out-of-bounds in dbAllocAG
	udf: Avoid double brelse() in udf_rename()
	fs: jfs: fix shift-out-of-bounds in dbDiscardAG
	ACPICA: Fix error code path in acpi_ds_call_control_method()
	nilfs2: fix shift-out-of-bounds/overflow in nilfs_sb2_bad_offset()
	acct: fix potential integer overflow in encode_comp_t()
	hfs: fix OOB Read in __hfs_brec_find
	wifi: ath9k: verify the expected usb_endpoints are present
	wifi: ar5523: Fix use-after-free on ar5523_cmd() timed out
	ASoC: codecs: rt298: Add quirk for KBL-R RVP platform
	ipmi: fix memleak when unload ipmi driver
	bpf: make sure skb->len != 0 when redirecting to a tunneling device
	net: ethernet: ti: Fix return type of netcp_ndo_start_xmit()
	hamradio: baycom_epp: Fix return type of baycom_send_packet()
	wifi: brcmfmac: Fix potential shift-out-of-bounds in brcmf_fw_alloc_request()
	igb: Do not free q_vector unless new one was allocated
	drm/amdgpu: Fix type of second parameter in trans_msg() callback
	s390/ctcm: Fix return type of ctc{mp,}m_tx()
	s390/netiucv: Fix return type of netiucv_tx()
	s390/lcs: Fix return type of lcs_start_xmit()
	drm/sti: Use drm_mode_copy()
	drivers/md/md-bitmap: check the return value of md_bitmap_get_counter()
	md/raid1: stop mdx_raid1 thread when raid1 array run failed
	mrp: introduce active flags to prevent UAF when applicant uninit
	ppp: associate skb with a device at tx
	media: dvb-frontends: fix leak of memory fw
	media: dvbdev: adopts refcnt to avoid UAF
	media: dvb-usb: fix memory leak in dvb_usb_adapter_init()
	blk-mq: fix possible memleak when register 'hctx' failed
	regulator: core: fix use_count leakage when handling boot-on
	mmc: f-sdh30: Add quirks for broken timeout clock capability
	media: si470x: Fix use-after-free in si470x_int_in_callback()
	clk: st: Fix memory leak in st_of_quadfs_setup()
	drm/fsl-dcu: Fix return type of fsl_dcu_drm_connector_mode_valid()
	drm/sti: Fix return type of sti_{dvo,hda,hdmi}_connector_mode_valid()
	orangefs: Fix kmemleak in orangefs_prepare_debugfs_help_string()
	ASoC: mediatek: mt8173-rt5650-rt5514: fix refcount leak in mt8173_rt5650_rt5514_dev_probe()
	ASoC: rockchip: pdm: Add missing clk_disable_unprepare() in rockchip_pdm_runtime_resume()
	ASoC: wm8994: Fix potential deadlock
	ASoC: rockchip: spdif: Add missing clk_disable_unprepare() in rk_spdif_runtime_resume()
	ASoC: rt5670: Remove unbalanced pm_runtime_put()
	pstore: Switch pmsg_lock to an rt_mutex to avoid priority inversion
	pstore: Make sure CONFIG_PSTORE_PMSG selects CONFIG_RT_MUTEXES
	usb: dwc3: core: defer probe on ulpi_read_id timeout
	HID: wacom: Ensure bootloader PID is usable in hidraw mode
	reiserfs: Add missing calls to reiserfs_security_free()
	iio: adc: ad_sigma_delta: do not use internal iio_dev lock
	gcov: add support for checksum field
	media: dvbdev: fix build warning due to comments
	media: dvbdev: fix refcnt bug
	ata: ahci: Fix PCS quirk application for suspend
	powerpc/rtas: avoid device tree lookups in rtas_os_term()
	powerpc/rtas: avoid scheduling in rtas_os_term()
	HID: plantronics: Additional PIDs for double volume key presses quirk
	hfsplus: fix bug causing custom uid and gid being unable to be assigned with mount
	ovl: Use ovl mounter's fsuid and fsgid in ovl_link()
	ALSA: line6: correct midi status byte when receiving data from podxt
	ALSA: line6: fix stack overflow in line6_midi_transmit
	pnode: terminate at peers of source
	md: fix a crash in mempool_free
	mmc: vub300: fix warning - do not call blocking ops when !TASK_RUNNING
	tpm: tpm_crb: Add the missed acpi_put_table() to fix memory leak
	tpm: tpm_tis: Add the missed acpi_put_table() to fix memory leak
	SUNRPC: Don't leak netobj memory when gss_read_proxy_verf() fails
	media: stv0288: use explicitly signed char
	soc: qcom: Select REMAP_MMIO for LLCC driver
	ktest.pl minconfig: Unset configs instead of just removing them
	ARM: ux500: do not directly dereference __iomem
	selftests: Use optional USERCFLAGS and USERLDFLAGS
	binfmt: Move install_exec_creds after setup_new_exec to match binfmt_elf
	binfmt: Fix error return code in load_elf_fdpic_binary()
	dm cache: Fix ABBA deadlock between shrink_slab and dm_cache_metadata_abort
	dm thin: Use last transaction's pmd->root when commit failed
	dm thin: Fix UAF in run_timer_softirq()
	dm cache: Fix UAF in destroy()
	dm cache: set needs_check flag after aborting metadata
	x86/microcode/intel: Do not retry microcode reloading on the APs
	tracing: Fix infinite loop in tracing_read_pipe on overflowed print_trace_line
	ARM: 9256/1: NWFPE: avoid compiler-generated __aeabi_uldivmod
	media: dvb-core: Fix double free in dvb_register_device()
	media: dvb-core: Fix UAF due to refcount races at releasing
	cifs: fix confusing debug message
	md/bitmap: Fix bitmap chunk size overflow issues
	ipmi: fix long wait in unload when IPMI disconnect
	ima: Fix a potential NULL pointer access in ima_restore_measurement_list
	ipmi: fix use after free in _ipmi_destroy_user()
	PCI: Fix pci_device_is_present() for VFs by checking PF
	PCI/sysfs: Fix double free in error path
	crypto: n2 - add missing hash statesize
	iommu/amd: Fix ivrs_acpihid cmdline parsing code
	parisc: led: Fix potential null-ptr-deref in start_task()
	device_cgroup: Roll back to original exceptions after copy failure
	drm/connector: send hotplug uevent on connector cleanup
	drm/vmwgfx: Validate the box size for the snooped cursor
	ext4: add inode table check in __ext4_get_inode_loc to aovid possible infinite loop
	ext4: fix undefined behavior in bit shift for ext4_check_flag_values
	ext4: add helper to check quota inums
	ext4: fix bug_on in __es_tree_search caused by bad boot loader inode
	ext4: init quota for 'old.inode' in 'ext4_rename'
	ext4: fix corruption when online resizing a 1K bigalloc fs
	ext4: fix error code return to user-space in ext4_get_branch()
	ext4: avoid BUG_ON when creating xattrs
	ext4: fix inode leak in ext4_xattr_inode_create() on an error path
	ext4: initialize quota before expanding inode in setproject ioctl
	ext4: avoid unaccounted block allocation when expanding inode
	ext4: allocate extended attribute value in vmalloc area
	btrfs: send: avoid unnecessary backref lookups when finding clone source
	btrfs: replace strncpy() with strscpy()
	media: s5p-mfc: Fix to handle reference queue during finishing
	media: s5p-mfc: Clear workbit to handle error condition
	media: s5p-mfc: Fix in register read and write for H264
	dm thin: resume even if in FAIL mode
	perf probe: Use dwarf_attr_integrate as generic DWARF attr accessor
	perf probe: Fix to get the DW_AT_decl_file and DW_AT_call_file as unsinged data
	ravb: Fix "failed to switch device to config mode" message during unbind
	driver core: Set deferred_probe_timeout to a longer default if CONFIG_MODULES is set
	ext4: goto right label 'failed_mount3a'
	ext4: correct inconsistent error msg in nojournal mode
	ext4: use kmemdup() to replace kmalloc + memcpy
	mbcache: don't reclaim used entries
	mbcache: add functions to delete entry if unused
	ext4: remove EA inode entry from mbcache on inode eviction
	ext4: unindent codeblock in ext4_xattr_block_set()
	ext4: fix race when reusing xattr blocks
	mbcache: automatically delete entries from cache on freeing
	ext4: fix deadlock due to mbcache entry corruption
	SUNRPC: ensure the matching upcall is in-flight upon downcall
	bpf: pull before calling skb_postpull_rcsum()
	qlcnic: prevent ->dcb use-after-free on qlcnic_dcb_enable() failure
	nfc: Fix potential resource leaks
	net: amd-xgbe: add missed tasklet_kill
	net: phy: xgmiitorgmii: Fix refcount leak in xgmiitorgmii_probe
	RDMA/mlx5: Fix validation of max_rd_atomic caps for DC
	net: sched: atm: dont intepret cls results when asked to drop
	usb: rndis_host: Secure rndis_query check against int overflow
	caif: fix memory leak in cfctrl_linkup_request()
	udf: Fix extension of the last extent in the file
	ASoC: Intel: bytcr_rt5640: Add quirk for the Advantech MICA-071 tablet
	x86/bugs: Flush IBP in ib_prctl_set()
	nfsd: fix handling of readdir in v4root vs. mount upcall timeout
	riscv: uaccess: fix type of 0 variable on error in get_user()
	ext4: don't allow journal inode to have encrypt flag
	hfs/hfsplus: use WARN_ON for sanity check
	hfs/hfsplus: avoid WARN_ON() for sanity check, use proper error handling
	mbcache: Avoid nesting of cache->c_list_lock under bit locks
	parisc: Align parisc MADV_XXX constants with all other architectures
	driver core: Fix bus_type.match() error handling in __driver_attach()
	net: sched: disallow noqueue for qdisc classes
	docs: Fix the docs build with Sphinx 6.0
	perf auxtrace: Fix address filter duplicate symbol selection
	s390/percpu: add READ_ONCE() to arch_this_cpu_to_op_simple()
	net/ulp: prevent ULP without clone op from entering the LISTEN status
	ALSA: pcm: Move rwsem lock inside snd_ctl_elem_read to prevent UAF
	cifs: Fix uninitialized memory read for smb311 posix symlink create
	platform/x86: sony-laptop: Don't turn off 0x153 keyboard backlight during probe
	ipv6: raw: Deduct extension header length in rawv6_push_pending_frames
	wifi: wilc1000: sdio: fix module autoloading
	ALSA: hda/hdmi: fix failures at PCM open on Intel ICL and later
	ktest: Add support for meta characters in GRUB_MENU
	ktest: introduce _get_grub_index
	ktest: cleanup get_grub_index
	ktest: introduce grub2bls REBOOT_TYPE option
	ktest.pl: Fix incorrect reboot for grub2bls
	kest.pl: Fix grub2 menu handling for rebooting
	usb: ulpi: defer ulpi_register on ulpi_read_id timeout
	quota: Factor out setup of quota inode
	ext4: fix bug_on in __es_tree_search caused by bad quota inode
	ext4: lost matching-pair of trace in ext4_truncate
	ext4: fix use-after-free in ext4_orphan_cleanup
	ext4: fix uninititialized value in 'ext4_evict_inode'
	ext4: generalize extents status tree search functions
	ext4: add new pending reservation mechanism
	ext4: fix reserved cluster accounting at delayed write time
	ext4: fix delayed allocation bug in ext4_clu_mapped for bigalloc + inline
	netfilter: ipset: Fix overflow before widen in the bitmap_ip_create() function.
	x86/boot: Avoid using Intel mnemonics in AT&T syntax asm
	EDAC/device: Fix period calculation in edac_device_reset_delay_period()
	regulator: da9211: Use irq handler when ready
	hvc/xen: lock console list traversal
	nfc: pn533: Wait for out_urb's completion in pn533_usb_send_frame()
	net/mlx5: Rename ptp clock info
	net/mlx5: Fix ptp max frequency adjustment range
	iommu/mediatek-v1: Add error handle for mtk_iommu_probe
	iommu/mediatek-v1: Fix an error handling path in mtk_iommu_v1_probe()
	x86/resctrl: Use task_curr() instead of task_struct->on_cpu to prevent unnecessary IPI
	x86/resctrl: Fix task CLOSID/RMID update race
	drm/virtio: Fix GEM handle creation UAF
	arm64: cmpxchg_double*: hazard against entire exchange variable
	efi: fix NULL-deref in init error path
	Revert "usb: ulpi: defer ulpi_register on ulpi_read_id timeout"
	tty: serial: tegra: Handle RX transfer in PIO mode if DMA wasn't started
	serial: tegra: Only print FIFO error message when an error occurs
	serial: tegra: Change lower tolerance baud rate limit for tegra20 and tegra30
	Linux 4.19.270

Change-Id: Ieb5e7f318a7e06effcc51e5f93751ec02dbb50c4
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-01-18 12:02:44 +00:00
Zhengchao Shao
04dd47a2e1 test_firmware: fix memory leak in test_firmware_init()
[ Upstream commit 7610615e8cdb3f6f5bbd9d8e7a5d8a63e3cabf2e ]

When misc_register() failed in test_firmware_init(), the memory pointed
by test_fw_config->name is not released. The memory leak information is
as follows:
unreferenced object 0xffff88810a34cb00 (size 32):
  comm "insmod", pid 7952, jiffies 4294948236 (age 49.060s)
  hex dump (first 32 bytes):
    74 65 73 74 2d 66 69 72 6d 77 61 72 65 2e 62 69  test-firmware.bi
    6e 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  n...............
  backtrace:
    [<ffffffff81b21fcb>] __kmalloc_node_track_caller+0x4b/0xc0
    [<ffffffff81affb96>] kstrndup+0x46/0xc0
    [<ffffffffa0403a49>] __test_firmware_config_init+0x29/0x380 [test_firmware]
    [<ffffffffa040f068>] 0xffffffffa040f068
    [<ffffffff81002c41>] do_one_initcall+0x141/0x780
    [<ffffffff816a72c3>] do_init_module+0x1c3/0x630
    [<ffffffff816adb9e>] load_module+0x623e/0x76a0
    [<ffffffff816af471>] __do_sys_finit_module+0x181/0x240
    [<ffffffff89978f99>] do_syscall_64+0x39/0xb0
    [<ffffffff89a0008b>] entry_SYSCALL_64_after_hwframe+0x63/0xcd

Fixes: c92316bf8e ("test_firmware: add batched firmware tests")
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
Acked-by: Luis Chamberlain <mcgrof@kernel.org>
Link: https://lore.kernel.org/r/20221119035721.18268-1-shaozhengchao@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-01-18 11:30:26 +01:00
Akinobu Mita
3795b07704 lib/notifier-error-inject: fix error when writing -errno to debugfs file
[ Upstream commit f883c3edd2c432a2931ec8773c70a570115a50fe ]

The simple attribute files do not accept a negative value since the commit
488dac0c9237 ("libfs: fix error cast of negative value in
simple_attr_write()").

This restores the previous behaviour by using newly introduced
DEFINE_SIMPLE_ATTRIBUTE_SIGNED instead of DEFINE_SIMPLE_ATTRIBUTE.

Link: https://lkml.kernel.org/r/20220919172418.45257-3-akinobu.mita@gmail.com
Fixes: 488dac0c9237 ("libfs: fix error cast of negative value in simple_attr_write()")
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Reported-by: Zhao Gongyi <zhaogongyi@huawei.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Alexander Viro <viro@zeniv.linux.org.uk>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Oscar Salvador <osalvador@suse.de>
Cc: Rafael J. Wysocki <rafael@kernel.org>
Cc: Shuah Khan <shuah@kernel.org>
Cc: Wei Yongjun <weiyongjun1@huawei.com>
Cc: Yicong Yang <yangyicong@hisilicon.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-01-18 11:30:06 +01:00
Aleksa Sarai
6a1e36af9d BACKPORT: lib: introduce copy_struct_from_user() helper
(cherry picked from commit f5a1a536fa14895ccff4e94e6a5af90901ce86aa)

A common pattern for syscall extensions is increasing the size of a
struct passed from userspace, such that the zero-value of the new fields
result in the old kernel behaviour (allowing for a mix of userspace and
kernel vintages to operate on one another in most cases).

While this interface exists for communication in both directions, only
one interface is straightforward to have reasonable semantics for
(userspace passing a struct to the kernel). For kernel returns to
userspace, what the correct semantics are (whether there should be an
error if userspace is unaware of a new extension) is very
syscall-dependent and thus probably cannot be unified between syscalls
(a good example of this problem is [1]).

Previously there was no common lib/ function that implemented
the necessary extension-checking semantics (and different syscalls
implemented them slightly differently or incompletely[2]). Future
patches replace common uses of this pattern to make use of
copy_struct_from_user().

Some in-kernel selftests that insure that the handling of alignment and
various byte patterns are all handled identically to memchr_inv() usage.
[1]: commit 1251201c0d34 ("sched/core: Fix uclamp ABI issue, clean up and
         robustify sched_read_attr() ABI logic and code").

[2]: For instance {sched_setattr,perf_event_open,clone3}(2) all do do
         similar checks to copy_struct_from_user() while rt_sigprocmask(2)
         always rejects differently-sized struct arguments.

Bug: 261681571
Suggested-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Reviewed-by: Kees Cook <keescook@chromium.org>
Reviewed-by: Christian Brauner <christian.brauner@ubuntu.com>
Link: https://lore.kernel.org/r/20191001011055.19283-2-cyphar@cyphar.com
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>
Git-Commit: f5a1a536fa14895ccff4e94e6a5af90901ce86aa
Git-Repo: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
Change-Id: Iea0cfb0efd37282daaf1fe2b45b4c1abd4e57adf
Signed-off-by: Kishor Krishna Bhat <quic_kishkris@quicinc.com>
Signed-off-by: JohnnLee <johnnlee@google.com>
2022-12-28 03:53:16 +00:00
Michael Bestas
45bf774877
Merge tag 'ASB-2022-12-05_4.19-stable' of https://android.googlesource.com/kernel/common into android13-4.19-kona
https://source.android.com/docs/security/bulletin/2022-12-01
CVE-2022-23960

# By Yang Yingliang (18) and others
# Via Greg Kroah-Hartman
* tag 'ASB-2022-12-05_4.19-stable' of https://android.googlesource.com/kernel/common:
  Linux 4.19.268
  ipc/sem: Fix dangling sem_array access in semtimedop race
  mmc: sdhci: Fix voltage switch delay
  mmc: sdhci: use FIELD_GET for preset value bit masks
  x86/ioremap: Fix page aligned size calculation in __ioremap_caller()
  Bluetooth: L2CAP: Fix accepting connection request for invalid SPSM
  x86/pm: Add enumeration check before spec MSRs save/restore setup
  x86/tsx: Add a feature bit for TSX control MSR support
  nvme: restrict management ioctls to admin
  tcp/udp: Fix memory leak in ipv6_renew_options().
  Kconfig.debug: provide a little extra FRAME_WARN leeway when KASAN is enabled
  parisc: Increase FRAME_WARN to 2048 bytes on parisc
  xtensa: increase size of gcc stack frame check
  parisc: Increase size of gcc stack frame check
  iommu/vt-d: Fix PCI device refcount leak in dmar_dev_scope_init()
  pinctrl: single: Fix potential division by zero
  ASoC: ops: Fix bounds check for _sx controls
  mm: Fix '.data.once' orphan section warning
  arm64: errata: Fix KVM Spectre-v2 mitigation selection for Cortex-A57/A72
  arm64: Fix panic() when Spectre-v2 causes Spectre-BHB to re-allocate KVM vectors
  pinctrl: intel: Save and restore pins in "direct IRQ" mode
  x86/bugs: Make sure MSR_SPEC_CTRL is updated properly upon resume from S3
  nilfs2: fix NULL pointer dereference in nilfs_palloc_commit_free_entry()
  tools/vm/slabinfo-gnuplot: use "grep -E" instead of "egrep"
  error-injection: Add prompt for function error injection
  btrfs: qgroup: fix sleep from invalid context bug in btrfs_qgroup_inherit()
  hwmon: (coretemp) fix pci device refcount leak in nv1a_ram_new()
  hwmon: (coretemp) Check for null before removing sysfs attrs
  net: ethernet: renesas: ravb: Fix promiscuous mode after system resumed
  packet: do not set TP_STATUS_CSUM_VALID on CHECKSUM_COMPLETE
  net: tun: Fix use-after-free in tun_detach()
  net: hsr: Fix potential use-after-free
  dsa: lan9303: Correct stat name
  net/9p: Fix a potential socket leak in p9_socket_open
  net: net_netdev: Fix error handling in ntb_netdev_init_module()
  net: phy: fix null-ptr-deref while probe() failed
  qlcnic: fix sleep-in-atomic-context bugs caused by msleep
  can: cc770: cc770_isa_probe(): add missing free_cc770dev()
  can: sja1000_isa: sja1000_isa_probe(): add missing free_sja1000dev()
  net/mlx5: Fix uninitialized variable bug in outlen_write()
  of: property: decrement node refcount in of_fwnode_get_reference_args()
  hwmon: (ibmpex) Fix possible UAF when ibmpex_register_bmc() fails
  hwmon: (i5500_temp) fix missing pci_disable_device()
  scripts/faddr2line: Fix regression in name resolution on ppc64le
  iio: light: rpr0521: add missing Kconfig dependencies
  iio: health: afe4404: Fix oob read in afe4404_[read|write]_raw
  iio: health: afe4403: Fix oob read in afe4403_read_raw
  Revert "x86/speculation: Change FILL_RETURN_BUFFER to work with objtool"
  v4l2: don't fall back to follow_pfn() if pin_user_pages_fast() fails
  proc: proc_skip_spaces() shouldn't think it is working on C strings
  proc: avoid integer type confusion in get_proc_long
  spi: spi-imx: Fix spi_bus_clk if requested clock is higher than input clock
  btrfs: free btrfs_path before copying inodes to userspace
  drm/amdgpu: always register an MMU notifier for userptr
  drm/amd/dc/dce120: Fix audio register mapping, stop triggering KASAN
  btrfs: free btrfs_path before copying subvol info to userspace
  btrfs: free btrfs_path before copying fspath to userspace
  btrfs: free btrfs_path before copying root refs to userspace
  dm integrity: flush the journal on suspend
  net: usb: qmi_wwan: add Telit 0x103a composition
  tcp: configurable source port perturb table size
  platform/x86: hp-wmi: Ignore Smart Experience App event
  platform/x86: acer-wmi: Enable SW_TABLET_MODE on Switch V 10 (SW5-017)
  platform/x86: asus-wmi: add missing pci_dev_put() in asus_wmi_set_xusb2pr()
  xen/platform-pci: add missing free_irq() in error path
  serial: 8250: 8250_omap: Avoid RS485 RTS glitch on ->set_termios()
  Input: synaptics - switch touchpad on HP Laptop 15-da3001TU to RMI mode
  nilfs2: fix nilfs_sufile_mark_dirty() not set segment usage as dirty
  ceph: avoid putting the realm twice when decoding snaps fails
  ceph: do not update snapshot context when there is no new snapshot
  iio: pressure: ms5611: fixed value compensation bug
  iio: ms5611: Simplify IO callback parameters
  nios2: add FORCE for vmlinuz.gz
  iio: core: Fix entry not deleted when iio_register_sw_trigger_type() fails
  iio: light: apds9960: fix wrong register for gesture gain
  arm64: dts: rockchip: lower rk3399-puma-haikou SD controller clock frequency
  s390/crashdump: fix TOD programmable field size
  net: thunderx: Fix the ACPI memory leak
  nfc: st-nci: fix memory leaks in EVT_TRANSACTION
  nfc: st-nci: fix incorrect validating logic in EVT_TRANSACTION
  s390/dasd: fix no record found for raw_track_access
  dccp/tcp: Reset saddr on failure after inet6?_hash_connect().
  bnx2x: fix pci device refcount leak in bnx2x_vf_is_pcie_pending()
  NFC: nci: fix memory leak in nci_rx_data_packet()
  xfrm: Fix ignored return value in xfrm6_init()
  tipc: check skb_linearize() return value in tipc_disc_rcv()
  tipc: add an extra conn_get in tipc_conn_alloc
  tipc: set con sock in tipc_conn_alloc
  net/mlx5: Fix FW tracer timestamp calculation
  Drivers: hv: vmbus: fix possible memory leak in vmbus_device_register()
  Drivers: hv: vmbus: fix double free in the error path of vmbus_add_channel_work()
  net: pch_gbe: fix pci device refcount leak while module exiting
  net/qla3xxx: fix potential memleak in ql3xxx_send()
  net/mlx4: Check retval of mlx4_bitmap_init
  ARM: mxs: fix memory leak in mxs_machine_init()
  9p/fd: fix issue of list_del corruption in p9_fd_cancel()
  net: pch_gbe: fix potential memleak in pch_gbe_tx_queue()
  nfc/nci: fix race with opening and closing
  ARM: dts: at91: sam9g20ek: enable udc vbus gpio pinctrl
  bus: sunxi-rsb: Support atomic transfers
  ASoC: sgtl5000: Reset the CHIP_CLK_CTRL reg on remove
  ARM: dts: am335x-pcm-953: Define fixed regulators in root node
  af_key: Fix send_acquire race with pfkey_register
  MIPS: pic32: treat port as signed integer
  RISC-V: vdso: Do not add missing symbols to version section in linker script
  drm: panel-orientation-quirks: Add quirk for Acer Switch V 10 (SW5-017)
  spi: stm32: fix stm32_spi_prepare_mbr() that halves spi clk for every run
  wifi: mac80211: Fix ack frame idr leak when mesh has no route
  audit: fix undefined behavior in bit shift for AUDIT_BIT
  wifi: mac80211_hwsim: fix debugfs attribute ps with rc table support
  Linux 4.19.267
  ntfs: check overflow when iterating ATTR_RECORDs
  ntfs: fix out-of-bounds read in ntfs_attr_find()
  ntfs: fix use-after-free in ntfs_attr_find()
  mm: fs: initialize fsdata passed to write_begin/write_end interface
  9p/trans_fd: always use O_NONBLOCK read/write
  gfs2: Switch from strlcpy to strscpy
  gfs2: Check sb_bsize_shift after reading superblock
  9p: trans_fd/p9_conn_cancel: drop client lock earlier
  kcm: close race conditions on sk_receive_queue
  bpf, test_run: Fix alignment problem in bpf_prog_test_run_skb()
  kcm: avoid potential race in kcm_tx_work
  tcp: cdg: allow tcp_cdg_release() to be called multiple times
  macvlan: enforce a consistent minimal mtu
  serial: 8250: Flush DMA Rx on RLSI
  Input: i8042 - fix leaking of platform device on module removal
  scsi: target: tcm_loop: Fix possible name leak in tcm_loop_setup_hba_bus()
  misc/vmw_vmci: fix an infoleak in vmci_host_do_receive_datagram()
  docs: update mediator contact information in CoC doc
  mmc: sdhci-pci: Fix possible memory leak caused by missing pci_dev_put()
  mmc: core: properly select voltage range without power cycle
  serial: 8250_lpss: Configure DMA also w/o DMA filter
  serial: 8250: Fall back to non-DMA Rx if IIR_RDI occurs
  dm ioctl: fix misbehavior if list_versions races with module loading
  iio: pressure: ms5611: changed hardcoded SPI speed to value limited
  iio: trigger: sysfs: fix possible memory leak in iio_sysfs_trig_init()
  iio: adc: at91_adc: fix possible memory leak in at91_adc_allocate_trigger()
  usb: chipidea: fix deadlock in ci_otg_del_timer
  usb: add NO_LPM quirk for Realforce 87U Keyboard
  USB: serial: option: add Fibocom FM160 0x0111 composition
  USB: serial: option: add u-blox LARA-L6 modem
  USB: serial: option: add u-blox LARA-R6 00B modem
  USB: serial: option: remove old LARA-R6 PID
  USB: serial: option: add Sierra Wireless EM9191
  speakup: fix a segfault caused by switching consoles
  slimbus: stream: correct presence rate frequencies
  ALSA: usb-audio: Drop snd_BUG_ON() from snd_usbmidi_output_open()
  ring_buffer: Do not deactivate non-existant pages
  ftrace: Fix null pointer dereference in ftrace_add_mod()
  ftrace: Optimize the allocation for mcount entries
  ftrace: Fix the possible incorrect kernel message
  net: thunderbolt: Fix error handling in tbnet_init()
  cifs: Fix wrong return value checking when GETFLAGS
  net/x25: Fix skb leak in x25_lapb_receive_frame()
  drbd: use after free in drbd_create_device()
  xen/pcpu: fix possible memory leak in register_pcpu()
  bnxt_en: Remove debugfs when pci_register_driver failed
  net: caif: fix double disconnect client in chnl_net_open()
  mISDN: fix misuse of put_device() in mISDN_register_device()
  mISDN: fix possible memory leak in mISDN_dsp_element_register()
  net: bgmac: Drop free_netdev() from bgmac_enet_remove()
  ata: libata-transport: fix double ata_host_put() in ata_tport_add()
  pinctrl: devicetree: fix null pointer dereferencing in pinctrl_dt_to_map
  parport_pc: Avoid FIFO port location truncation
  siox: fix possible memory leak in siox_device_add()
  block: sed-opal: kmalloc the cmd/resp buffers
  ASoC: soc-utils: Remove __exit for snd_soc_util_exit()
  tty: n_gsm: fix sleep-in-atomic-context bug in gsm_control_send
  serial: imx: Add missing .thaw_noirq hook
  serial: 8250: omap: Flush PM QOS work on remove
  serial: 8250_omap: remove wait loop from Errata i202 workaround
  ASoC: core: Fix use-after-free in snd_soc_exit()
  Bluetooth: L2CAP: Fix l2cap_global_chan_by_psm
  btrfs: remove pointless and double ulist frees in error paths of qgroup tests
  drm/imx: imx-tve: Fix return type of imx_tve_connector_mode_valid
  NFSv4: Retry LOCK on OLD_STATEID during delegation return
  selftests/intel_pstate: fix build for ARCH=x86_64
  selftests/futex: fix build for clang
  spi: intel: Fix the offset to get the 64K erase opcode
  ASoC: wm8997: Revert "ASoC: wm8997: Fix PM disable depth imbalance in wm8997_probe"
  ASoC: wm5110: Revert "ASoC: wm5110: Fix PM disable depth imbalance in wm5110_probe"
  ASoC: wm5102: Revert "ASoC: wm5102: Fix PM disable depth imbalance in wm5102_probe"
  x86/cpu: Restore AMD's DE_CFG MSR after resume
  net: tun: call napi_schedule_prep() to ensure we own a napi
  dmaengine: at_hdmac: Check return code of dma_async_device_register
  dmaengine: at_hdmac: Fix impossible condition
  dmaengine: at_hdmac: Don't allow CPU to reorder channel enable
  dmaengine: at_hdmac: Fix completion of unissued descriptor in case of errors
  dmaengine: at_hdmac: Don't start transactions at tx_submit level
  dmaengine: at_hdmac: Fix at_lli struct definition
  cert host tools: Stop complaining about deprecated OpenSSL functions
  udf: Fix a slab-out-of-bounds write bug in udf_find_entry()
  btrfs: selftests: fix wrong error check in btrfs_free_dummy_root()
  platform/x86: hp_wmi: Fix rfkill causing soft blocked wifi
  drm/i915/dmabuf: fix sg_table handling in map_dma_buf
  nilfs2: fix use-after-free bug of ns_writer on remount
  nilfs2: fix deadlock in nilfs_count_free_blocks()
  vmlinux.lds.h: Fix placement of '.data..decrypted' section
  ALSA: usb-audio: Add DSD support for Accuphase DAC-60
  ALSA: usb-audio: Add quirk entry for M-Audio Micro
  ALSA: hda: fix potential memleak in 'add_widget_node'
  ALSA: hda/ca0132: add quirk for EVGA Z390 DARK
  arm64: efi: Fix handling of misaligned runtime regions and drop warning
  riscv: process: fix kernel info leakage
  net: macvlan: fix memory leaks of macvlan_common_newlink
  net: mv643xx_eth: disable napi when init rxq or txq failed in mv643xx_eth_open()
  ethernet: s2io: disable napi when start nic failed in s2io_card_up()
  net: cxgb3_main: disable napi when bind qsets failed in cxgb_up()
  net: nixge: disable napi when enable interrupts failed in nixge_open()
  drivers: net: xgene: disable napi when register irq failed in xgene_enet_open()
  dmaengine: mv_xor_v2: Fix a resource leak in mv_xor_v2_remove()
  tipc: fix the msg->req tlv len check in tipc_nl_compat_name_table_dump_header
  ipv6: addrlabel: fix infoleak when sending struct ifaddrlblmsg to network
  drm/vc4: Fix missing platform_unregister_drivers() call in vc4_drm_register()
  hamradio: fix issue of dev reference count leakage in bpq_device_event()
  net: lapbether: fix issue of dev reference count leakage in lapbeth_device_event()
  capabilities: fix undefined behavior in bit shift for CAP_TO_MASK
  net: fman: Unregister ethernet device on removal
  bnxt_en: fix potentially incorrect return value for ndo_rx_flow_steer
  net: tun: Fix memory leaks of napi_get_frags
  net: gso: fix panic on frag_list with mixed head alloc types
  HID: hyperv: fix possible memory leak in mousevsc_probe()
  wifi: cfg80211: fix memory leak in query_regdb_file()
  phy: stm32: fix an error code in probe
  Linux 4.19.266
  x86/speculation: Add RSB VM Exit protections
  x86/bugs: Warn when "ibrs" mitigation is selected on Enhanced IBRS parts
  x86/speculation: Use DECLARE_PER_CPU for x86_spec_ctrl_current
  x86/speculation: Disable RRSBA behavior
  x86/bugs: Add Cannon lake to RETBleed affected CPU list
  x86/cpu/amd: Enumerate BTC_NO
  x86/common: Stamp out the stepping madness
  x86/speculation: Fill RSB on vmexit for IBRS
  KVM: VMX: Fix IBRS handling after vmexit
  KVM: VMX: Prevent guest RSB poisoning attacks with eIBRS
  x86/speculation: Remove x86_spec_ctrl_mask
  x86/speculation: Use cached host SPEC_CTRL value for guest entry/exit
  x86/speculation: Fix SPEC_CTRL write on SMT state change
  x86/speculation: Fix firmware entry SPEC_CTRL handling
  x86/speculation: Fix RSB filling with CONFIG_RETPOLINE=n
  x86/speculation: Change FILL_RETURN_BUFFER to work with objtool
  intel_idle: Disable IBRS during long idle
  x86/bugs: Report Intel retbleed vulnerability
  x86/bugs: Split spectre_v2_select_mitigation() and spectre_v2_user_select_mitigation()
  x86/speculation: Add spectre_v2=ibrs option to support Kernel IBRS
  x86/bugs: Optimize SPEC_CTRL MSR writes
  x86/entry: Add kernel IBRS implementation
  x86/entry: Remove skip_r11rcx
  x86/bugs: Keep a per-CPU IA32_SPEC_CTRL value
  x86/bugs: Add AMD retbleed= boot parameter
  x86/bugs: Report AMD retbleed vulnerability
  x86/cpufeatures: Move RETPOLINE flags to word 11
  x86/cpu: Add a steppings field to struct x86_cpu_id
  x86/cpu: Add consistent CPU match macros
  x86/devicetable: Move x86 specific macro out of generic code
  x86/cpufeature: Fix various quality problems in the <asm/cpu_device_hd.h> header
  x86/cpufeature: Add facility to check for min microcode revisions
  Revert "x86/cpu: Add a steppings field to struct x86_cpu_id"
  Revert "x86/speculation: Add RSB VM Exit protections"
  ANDROID: preserve CRC for some DRM functions
  Revert "tcp/udp: Make early_demux back namespacified."
  Linux 4.19.265
  wifi: brcmfmac: Fix potential buffer overflow in brcmf_fweh_event_worker()
  linux/bits.h: make BIT(), GENMASK(), and friends available in assembly
  KVM: x86: emulator: update the emulation mode after CR0 write
  KVM: x86: emulator: introduce emulator_recalc_and_set_mode
  KVM: x86: emulator: em_sysexit should update ctxt->mode
  KVM: x86: Mask off reserved bits in CPUID.80000008H
  ext4: fix warning in 'ext4_da_release_space'
  parisc: Avoid printing the hardware path twice
  parisc: Export iosapic_serial_irq() symbol for serial port driver
  parisc: Make 8250_gsc driver dependend on CONFIG_PARISC
  efi: random: reduce seed size to 32 bytes
  ALSA: usb-audio: Add quirks for MacroSilicon MS2100/MS2106 devices
  capabilities: fix potential memleak on error path from vfs_getxattr_alloc()
  tracing/histogram: Update document for KEYS_MAX size
  kprobe: reverse kp->flags when arm_kprobe failed
  tcp/udp: Make early_demux back namespacified.
  btrfs: fix type of parameter generation in btrfs_get_dentry
  block, bfq: protect 'bfqd->queued' by 'bfqd->lock'
  Bluetooth: L2CAP: Fix attempting to access uninitialized memory
  i2c: xiic: Add platform module alias
  HID: saitek: add madcatz variant of MMO7 mouse device ID
  media: dvb-frontends/drxk: initialize err to 0
  media: cros-ec-cec: limit msg.len to CEC_MAX_MSG_SIZE
  media: s5p_cec: limit msg.len to CEC_MAX_MSG_SIZE
  ipv6: fix WARNING in ip6_route_net_exit_late()
  net, neigh: Fix null-ptr-deref in neigh_table_clear()
  net: mdio: fix undefined behavior in bit shift for __mdiobus_register
  Bluetooth: L2CAP: fix use-after-free in l2cap_conn_del()
  Bluetooth: L2CAP: Fix use-after-free caused by l2cap_reassemble_sdu
  btrfs: fix ulist leaks in error paths of qgroup self tests
  btrfs: fix inode list leak during backref walking at resolve_indirect_refs()
  isdn: mISDN: netjet: fix wrong check of device registration
  mISDN: fix possible memory leak in mISDN_register_device()
  rose: Fix NULL pointer dereference in rose_send_frame()
  ipvs: fix WARNING in ip_vs_app_net_cleanup()
  ipvs: fix WARNING in __ip_vs_cleanup_batch()
  ipvs: use explicitly signed chars
  net: tun: fix bugs for oversize packet when napi frags enabled
  net: sched: Fix use after free in red_enqueue()
  ata: pata_legacy: fix pdc20230_set_piomode()
  net: fec: fix improper use of NETDEV_TX_BUSY
  nfc: nfcmrvl: Fix potential memory leak in nfcmrvl_i2c_nci_send()
  nfc: s3fwrn5: Fix potential memory leak in s3fwrn5_nci_send()
  RDMA/qedr: clean up work queue on failure in qedr_alloc_resources()
  net: dsa: Fix possible memory leaks in dsa_loop_init()
  nfs4: Fix kmemleak when allocate slot failed
  NFSv4.1: We must always send RECLAIM_COMPLETE after a reboot
  NFSv4.1: Handle RECLAIM_COMPLETE trunking errors
  BACKPORT: ARM: 9039/1: assembler: generalize byte swapping macro into rev_l
  BACKPORT: ARM: 9035/1: uncompress: Add be32tocpu macro

 Conflicts:
	drivers/mmc/host/sdhci.c
	drivers/slimbus/stream.c

Change-Id: Ic112be181f3558a83f85d01fb4e25444f14c7548
2022-12-15 21:06:13 +02:00
Greg Kroah-Hartman
b969cbb180 This is the 4.19.268 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmORulwACgkQONu9yGCS
 aT7rlxAAqr6GK3Ei3JnP+/bWtrZxOZaMJ3v4d+o0x680B0MYPiCl8O2MGLOTFh5S
 TLhYsYEddu+xAmLBLDFJzylIPr6EDKXBDS8i4w6/WWJA2Wqvk2vp2Mculm6OeIly
 Np7NycSvqpxxfWCxqzilUqdu5pcTGbUB6fM+iCXIeDxLhFN+q4gztIBSBUwr2fHI
 Okek8QOPHQGT2dQQvQLSo/41MQYm0g6d5U2/mvkRysz9esUKB5TqYBxBkla6hb8s
 A83fZ/TGZwulwyJUhJVbEGsQ0Jbr/uzRS6LrRkAFYMp+FQN194w+2Xb/AN6xiKij
 miVZxUgS+tLbuL2CZ+AjEVlkOdtQMLvzn3GNX+iYAMPnXvPiLq6cVhCvm77EM6Xs
 gQ1fc42REvnLl03lIvYcIBNG6ESXCBzLaX+qHPqPzl3OPcOv9VYVMEzQ0DVXXp+I
 +3fzLoQNLbtV7OSQ17d+Uxijw0U2aXMemoPlGGAxhntIs/Pn/NGhGSKmYed9aImp
 328YgGIBvaqINrAuenaXLckzEcxXRzfb+iM+V7yJ1gE5pam0eppbbuH2hTQTIzqS
 PPqWdq6fPSjgB/RvRURj36bGgUIMdei8Jt0/GXDWgIe4qgstDJKAQ2fQuiVVOfI0
 arMRtQSW8wTB/gOTOSgGpNiEywqK8mj7EtutOFUdGa5IAdloMZY=
 =+EDx
 -----END PGP SIGNATURE-----

Merge 4.19.268 into android-4.19-stable

Changes in 4.19.268
	wifi: mac80211_hwsim: fix debugfs attribute ps with rc table support
	audit: fix undefined behavior in bit shift for AUDIT_BIT
	wifi: mac80211: Fix ack frame idr leak when mesh has no route
	spi: stm32: fix stm32_spi_prepare_mbr() that halves spi clk for every run
	drm: panel-orientation-quirks: Add quirk for Acer Switch V 10 (SW5-017)
	RISC-V: vdso: Do not add missing symbols to version section in linker script
	MIPS: pic32: treat port as signed integer
	af_key: Fix send_acquire race with pfkey_register
	ARM: dts: am335x-pcm-953: Define fixed regulators in root node
	ASoC: sgtl5000: Reset the CHIP_CLK_CTRL reg on remove
	bus: sunxi-rsb: Support atomic transfers
	ARM: dts: at91: sam9g20ek: enable udc vbus gpio pinctrl
	nfc/nci: fix race with opening and closing
	net: pch_gbe: fix potential memleak in pch_gbe_tx_queue()
	9p/fd: fix issue of list_del corruption in p9_fd_cancel()
	ARM: mxs: fix memory leak in mxs_machine_init()
	net/mlx4: Check retval of mlx4_bitmap_init
	net/qla3xxx: fix potential memleak in ql3xxx_send()
	net: pch_gbe: fix pci device refcount leak while module exiting
	Drivers: hv: vmbus: fix double free in the error path of vmbus_add_channel_work()
	Drivers: hv: vmbus: fix possible memory leak in vmbus_device_register()
	net/mlx5: Fix FW tracer timestamp calculation
	tipc: set con sock in tipc_conn_alloc
	tipc: add an extra conn_get in tipc_conn_alloc
	tipc: check skb_linearize() return value in tipc_disc_rcv()
	xfrm: Fix ignored return value in xfrm6_init()
	NFC: nci: fix memory leak in nci_rx_data_packet()
	bnx2x: fix pci device refcount leak in bnx2x_vf_is_pcie_pending()
	dccp/tcp: Reset saddr on failure after inet6?_hash_connect().
	s390/dasd: fix no record found for raw_track_access
	nfc: st-nci: fix incorrect validating logic in EVT_TRANSACTION
	nfc: st-nci: fix memory leaks in EVT_TRANSACTION
	net: thunderx: Fix the ACPI memory leak
	s390/crashdump: fix TOD programmable field size
	arm64: dts: rockchip: lower rk3399-puma-haikou SD controller clock frequency
	iio: light: apds9960: fix wrong register for gesture gain
	iio: core: Fix entry not deleted when iio_register_sw_trigger_type() fails
	nios2: add FORCE for vmlinuz.gz
	iio: ms5611: Simplify IO callback parameters
	iio: pressure: ms5611: fixed value compensation bug
	ceph: do not update snapshot context when there is no new snapshot
	ceph: avoid putting the realm twice when decoding snaps fails
	nilfs2: fix nilfs_sufile_mark_dirty() not set segment usage as dirty
	Input: synaptics - switch touchpad on HP Laptop 15-da3001TU to RMI mode
	serial: 8250: 8250_omap: Avoid RS485 RTS glitch on ->set_termios()
	xen/platform-pci: add missing free_irq() in error path
	platform/x86: asus-wmi: add missing pci_dev_put() in asus_wmi_set_xusb2pr()
	platform/x86: acer-wmi: Enable SW_TABLET_MODE on Switch V 10 (SW5-017)
	platform/x86: hp-wmi: Ignore Smart Experience App event
	tcp: configurable source port perturb table size
	net: usb: qmi_wwan: add Telit 0x103a composition
	dm integrity: flush the journal on suspend
	btrfs: free btrfs_path before copying root refs to userspace
	btrfs: free btrfs_path before copying fspath to userspace
	btrfs: free btrfs_path before copying subvol info to userspace
	drm/amd/dc/dce120: Fix audio register mapping, stop triggering KASAN
	drm/amdgpu: always register an MMU notifier for userptr
	btrfs: free btrfs_path before copying inodes to userspace
	spi: spi-imx: Fix spi_bus_clk if requested clock is higher than input clock
	proc: avoid integer type confusion in get_proc_long
	proc: proc_skip_spaces() shouldn't think it is working on C strings
	v4l2: don't fall back to follow_pfn() if pin_user_pages_fast() fails
	Revert "x86/speculation: Change FILL_RETURN_BUFFER to work with objtool"
	iio: health: afe4403: Fix oob read in afe4403_read_raw
	iio: health: afe4404: Fix oob read in afe4404_[read|write]_raw
	iio: light: rpr0521: add missing Kconfig dependencies
	scripts/faddr2line: Fix regression in name resolution on ppc64le
	hwmon: (i5500_temp) fix missing pci_disable_device()
	hwmon: (ibmpex) Fix possible UAF when ibmpex_register_bmc() fails
	of: property: decrement node refcount in of_fwnode_get_reference_args()
	net/mlx5: Fix uninitialized variable bug in outlen_write()
	can: sja1000_isa: sja1000_isa_probe(): add missing free_sja1000dev()
	can: cc770: cc770_isa_probe(): add missing free_cc770dev()
	qlcnic: fix sleep-in-atomic-context bugs caused by msleep
	net: phy: fix null-ptr-deref while probe() failed
	net: net_netdev: Fix error handling in ntb_netdev_init_module()
	net/9p: Fix a potential socket leak in p9_socket_open
	dsa: lan9303: Correct stat name
	net: hsr: Fix potential use-after-free
	net: tun: Fix use-after-free in tun_detach()
	packet: do not set TP_STATUS_CSUM_VALID on CHECKSUM_COMPLETE
	net: ethernet: renesas: ravb: Fix promiscuous mode after system resumed
	hwmon: (coretemp) Check for null before removing sysfs attrs
	hwmon: (coretemp) fix pci device refcount leak in nv1a_ram_new()
	btrfs: qgroup: fix sleep from invalid context bug in btrfs_qgroup_inherit()
	error-injection: Add prompt for function error injection
	tools/vm/slabinfo-gnuplot: use "grep -E" instead of "egrep"
	nilfs2: fix NULL pointer dereference in nilfs_palloc_commit_free_entry()
	x86/bugs: Make sure MSR_SPEC_CTRL is updated properly upon resume from S3
	pinctrl: intel: Save and restore pins in "direct IRQ" mode
	arm64: Fix panic() when Spectre-v2 causes Spectre-BHB to re-allocate KVM vectors
	arm64: errata: Fix KVM Spectre-v2 mitigation selection for Cortex-A57/A72
	mm: Fix '.data.once' orphan section warning
	ASoC: ops: Fix bounds check for _sx controls
	pinctrl: single: Fix potential division by zero
	iommu/vt-d: Fix PCI device refcount leak in dmar_dev_scope_init()
	parisc: Increase size of gcc stack frame check
	xtensa: increase size of gcc stack frame check
	parisc: Increase FRAME_WARN to 2048 bytes on parisc
	Kconfig.debug: provide a little extra FRAME_WARN leeway when KASAN is enabled
	tcp/udp: Fix memory leak in ipv6_renew_options().
	nvme: restrict management ioctls to admin
	x86/tsx: Add a feature bit for TSX control MSR support
	x86/pm: Add enumeration check before spec MSRs save/restore setup
	Bluetooth: L2CAP: Fix accepting connection request for invalid SPSM
	x86/ioremap: Fix page aligned size calculation in __ioremap_caller()
	mmc: sdhci: use FIELD_GET for preset value bit masks
	mmc: sdhci: Fix voltage switch delay
	ipc/sem: Fix dangling sem_array access in semtimedop race
	Linux 4.19.268

Change-Id: Ifb1a44994650c56c8be98fa5eaff557699c0999e
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2022-12-08 16:32:00 +00:00
Lee Jones
73b68e326e Kconfig.debug: provide a little extra FRAME_WARN leeway when KASAN is enabled
[ Upstream commit 152fe65f300e1819d59b80477d3e0999b4d5d7d2 ]

When enabled, KASAN enlarges function's stack-frames.  Pushing quite a few
over the current threshold.  This can mainly be seen on 32-bit
architectures where the present limit (when !GCC) is a lowly 1024-Bytes.

Link: https://lkml.kernel.org/r/20221125120750.3537134-3-lee@kernel.org
Signed-off-by: Lee Jones <lee@kernel.org>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: "Christian König" <christian.koenig@amd.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Cc: David Airlie <airlied@gmail.com>
Cc: Harry Wentland <harry.wentland@amd.com>
Cc: Leo Li <sunpeng.li@amd.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Nathan Chancellor <nathan@kernel.org>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Cc: "Pan, Xinhui" <Xinhui.Pan@amd.com>
Cc: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Tom Rix <trix@redhat.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-08 11:18:34 +01:00
Helge Deller
d8fafe2a8e parisc: Increase FRAME_WARN to 2048 bytes on parisc
[ Upstream commit 8d192bec534bd5b778135769a12e5f04580771f7 ]

PA-RISC uses a much bigger frame size for functions than other
architectures. So increase it to 2048 for 32- and 64-bit kernels.
This fixes e.g. a warning in lib/xxhash.c.

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Helge Deller <deller@gmx.de>
Stable-dep-of: 152fe65f300e ("Kconfig.debug: provide a little extra FRAME_WARN leeway when KASAN is enabled")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-08 11:18:34 +01:00
Guenter Roeck
854983fdfa xtensa: increase size of gcc stack frame check
[ Upstream commit 867050247e295cf20fce046a92a7e6491fcfe066 ]

xtensa frame size is larger than the frame size for almost all other
architectures.  This results in more than 50 "the frame size of <n> is
larger than 1024 bytes" errors when trying to build xtensa:allmodconfig.

Increase frame size for xtensa to 1536 bytes to avoid compile errors due
to frame size limits.

Link: https://lkml.kernel.org/r/20210912025235.3514761-1-linux@roeck-us.net
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
Reviewed-by: Max Filippov <jcmvbkbc@gmail.com>
Cc: Chris Zankel <chris@zankel.net>
Cc: David Laight <David.Laight@ACULAB.COM>
Cc: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Stable-dep-of: 152fe65f300e ("Kconfig.debug: provide a little extra FRAME_WARN leeway when KASAN is enabled")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-12-08 11:18:34 +01:00