Commit graph

6782 commits

Author SHA1 Message Date
Michael Bestas
bfc560ed37
Merge tag 'ASB-2024-01-05_4.19-stable' of https://android.googlesource.com/kernel/common into android13-4.19-kona
https://source.android.com/docs/security/bulletin/2024-01-01

* tag 'ASB-2024-01-05_4.19-stable' of https://android.googlesource.com/kernel/common:
  Linux 4.19.304
  block: Don't invalidate pagecache for invalid falloc modes
  dm-integrity: don't modify bio's immutable bio_vec in integrity_metadata()
  smb: client: fix OOB in smbCalcSize()
  usb: fotg210-hcd: delete an incorrect bounds test
  usb: musb: fix MUSB_QUIRK_B_DISCONNECT_99 handling
  x86/alternatives: Sync core before enabling interrupts
  net: rfkill: gpio: set GPIO direction
  net: 9p: avoid freeing uninit memory in p9pdu_vreadf
  Bluetooth: hci_event: Fix not checking if HCI_OP_INQUIRY has been sent
  USB: serial: option: add Quectel RM500Q R13 firmware support
  USB: serial: option: add Foxconn T99W265 with new baseline
  USB: serial: option: add Quectel EG912Y module support
  USB: serial: ftdi_sio: update Actisense PIDs constant names
  wifi: cfg80211: fix certs build to not depend on file order
  wifi: cfg80211: Add my certificate
  iio: common: ms_sensors: ms_sensors_i2c: fix humidity conversion time table
  scsi: bnx2fc: Fix skb double free in bnx2fc_rcv()
  scsi: bnx2fc: Remove set but not used variable 'oxid'
  Input: ipaq-micro-keys - add error handling for devm_kmemdup
  iio: imu: inv_mpu6050: fix an error code problem in inv_mpu6050_read_raw
  btrfs: do not allow non subvolume root targets for snapshot
  smb: client: fix NULL deref in asn1_ber_decoder()
  pinctrl: at91-pio4: use dedicated lock class for IRQ
  net: check dev->gso_max_size in gso_features_check()
  net: warn if gso_type isn't set for a GSO SKB
  afs: Fix the dynamic root's d_delete to always delete unused dentries
  net: check vlan filter feature in vlan_vids_add_by_dev() and vlan_vids_del_by_dev()
  net/rose: fix races in rose_kill_by_device()
  ethernet: atheros: fix a memleak in atl1e_setup_ring_resources
  net: sched: ife: fix potential use-after-free
  net/mlx5: Fix fw tracer first block check
  net/mlx5: improve some comments
  wifi: mac80211: mesh_plink: fix matches_local logic
  s390/vx: fix save/restore of fpu kernel context
  reset: Fix crash when freeing non-existent optional resets
  ARM: OMAP2+: Fix null pointer dereference and memory leak in omap_soc_device_init
  ksmbd: fix wrong name of SMB2_CREATE_ALLOCATION_SIZE
  ALSA: hda/realtek: Enable headset on Lenovo M90 Gen5
  ALSA: hda/realtek: Enable headset onLenovo M70/M90
  ALSA: hda/realtek: Add quirk for Lenovo TianYi510Pro-14IOB
  arm64: dts: mediatek: mt8173-evb: Fix regulator-fixed node names
  Revert "cred: switch to using atomic_long_t"
  Linux 4.19.303
  powerpc/ftrace: Fix stack teardown in ftrace_no_trace
  powerpc/ftrace: Create a dummy stackframe to fix stack unwind
  mmc: block: Be sure to wait while busy in CQE error recovery
  ring-buffer: Fix memory leak of free page
  team: Fix use-after-free when an option instance allocation fails
  arm64: mm: Always make sw-dirty PTEs hw-dirty in pte_modify
  ext4: prevent the normalized size from exceeding EXT_MAX_BLOCKS
  perf: Fix perf_event_validate_size() lockdep splat
  HID: hid-asus: add const to read-only outgoing usb buffer
  net: usb: qmi_wwan: claim interface 4 for ZTE MF290
  asm-generic: qspinlock: fix queued_spin_value_unlocked() implementation
  HID: multitouch: Add quirk for HONOR GLO-GXXX touchpad
  HID: hid-asus: reset the backlight brightness level on resume
  HID: add ALWAYS_POLL quirk for Apple kb
  platform/x86: intel_telemetry: Fix kernel doc descriptions
  bcache: avoid NULL checking to c->root in run_cache_set()
  bcache: add code comments for bch_btree_node_get() and __bch_btree_node_alloc()
  bcache: avoid oversize memory allocation by small stripe_size
  blk-throttle: fix lockdep warning of "cgroup_mutex or RCU read lock required!"
  cred: switch to using atomic_long_t
  Revert "PCI: acpiphp: Reassign resources on bridge if necessary"
  appletalk: Fix Use-After-Free in atalk_ioctl
  net: stmmac: Handle disabled MDIO busses from devicetree
  vsock/virtio: Fix unsigned integer wrap around in virtio_transport_has_space()
  sign-file: Fix incorrect return values check
  net: Remove acked SYN flag from packet in the transmit queue correctly
  qed: Fix a potential use-after-free in qed_cxt_tables_alloc
  net/rose: Fix Use-After-Free in rose_ioctl
  atm: Fix Use-After-Free in do_vcc_ioctl
  atm: solos-pci: Fix potential deadlock on &tx_queue_lock
  atm: solos-pci: Fix potential deadlock on &cli_queue_lock
  qca_spi: Fix reset behavior
  qca_debug: Fix ethtool -G iface tx behavior
  qca_debug: Prevent crash on TX ring changes
  Revert "psample: Require 'CAP_NET_ADMIN' when joining "packets" group"
  Revert "genetlink: add CAP_NET_ADMIN test for multicast bind"
  Revert "drop_monitor: Require 'CAP_SYS_ADMIN' when joining "events" group"
  Revert "perf/core: Add a new read format to get a number of lost samples"
  Revert "perf: Fix perf_event_validate_size()"
  Revert "hrtimers: Push pending hrtimers away from outgoing CPU earlier"
  ANDROID: Snapshot Mainline's version of checkpatch.pl
  Linux 4.19.302
  devcoredump: Send uevent once devcd is ready
  devcoredump : Serialize devcd_del work
  IB/isert: Fix unaligned immediate-data handling
  tools headers UAPI: Sync linux/perf_event.h with the kernel sources
  drop_monitor: Require 'CAP_SYS_ADMIN' when joining "events" group
  psample: Require 'CAP_NET_ADMIN' when joining "packets" group
  genetlink: add CAP_NET_ADMIN test for multicast bind
  netlink: don't call ->netlink_bind with table lock held
  nilfs2: fix missing error check for sb_set_blocksize call
  KVM: s390/mm: Properly reset no-dat
  x86/CPU/AMD: Check vendor in the AMD microcode callback
  serial: 8250_omap: Add earlycon support for the AM654 UART controller
  serial: sc16is7xx: address RX timeout interrupt errata
  usb: typec: class: fix typec_altmode_put_partner to put plugs
  parport: Add support for Brainboxes IX/UC/PX parallel cards
  usb: gadget: f_hid: fix report descriptor allocation
  gpiolib: sysfs: Fix error handling on failed export
  perf: Fix perf_event_validate_size()
  perf/core: Add a new read format to get a number of lost samples
  tracing: Fix a possible race when disabling buffered events
  tracing: Fix incomplete locking when disabling buffered events
  tracing: Always update snapshot buffer size
  nilfs2: prevent WARNING in nilfs_sufile_set_segment_usage()
  packet: Move reference count in packet_sock to atomic_long_t
  ALSA: pcm: fix out-of-bounds in snd_pcm_state_names
  ARM: dts: imx7: Declare timers compatible with fsl,imx6dl-gpt
  ARM: dts: imx: make gpt node name generic
  ARM: imx: Check return value of devm_kasprintf in imx_mmdc_perf_init
  scsi: be2iscsi: Fix a memleak in beiscsi_init_wrb_handle()
  tracing: Fix a warning when allocating buffered events fails
  hwmon: (acpi_power_meter) Fix 4.29 MW bug
  RDMA/bnxt_re: Correct module description string
  tcp: do not accept ACK of bytes we never sent
  netfilter: xt_owner: Fix for unsafe access of sk->sk_socket
  netfilter: xt_owner: Add supplementary groups option
  net: hns: fix fake link up on xge port
  ipv4: ip_gre: Avoid skb_pull() failure in ipgre_xmit()
  arcnet: restoring support for multiple Sohard Arcnet cards
  net: arcnet: com20020 fix error handling
  net: arcnet: Fix RESET flag handling
  hv_netvsc: rndis_filter needs to select NLS
  ipv6: fix potential NULL deref in fib6_add()
  drm/amdgpu: correct chunk_ptr to a pointer to chunk.
  kconfig: fix memory leak from range properties
  tg3: Increment tx_dropped in tg3_tso_bug()
  tg3: Move the [rt]x_dropped counters to tg3_napi
  netfilter: ipset: fix race condition between swap/destroy and kernel side add/del/test
  hrtimers: Push pending hrtimers away from outgoing CPU earlier
  media: davinci: vpif_capture: fix potential double free
  spi: imx: mx51-ecspi: Move some initialisation to prepare_message hook.
  spi: imx: correct wml as the last sg length
  spi: imx: move wml setting to later than setup_transfer
  spi: imx: add a device specific prepare_message callback
  Linux 4.19.301
  mmc: block: Retry commands in CQE error recovery
  mmc: core: convert comma to semicolon
  mmc: cqhci: Fix task clearing in CQE error recovery
  mmc: cqhci: Warn of halt or task clear failure
  mmc: cqhci: Increase recovery halt timeout
  cpufreq: imx6q: Don't disable 792 Mhz OPP unnecessarily
  cpufreq: imx6q: don't warn for disabling a non-existing frequency
  ima: detect changes to the backing overlay file
  ovl: skip overlayfs superblocks at global sync
  ima: annotate iint mutex to avoid lockdep false positive warnings
  fbdev: stifb: Make the STI next font pointer a 32-bit signed offset
  mtd: cfi_cmdset_0001: Byte swap OTP info
  mtd: cfi_cmdset_0001: Support the absence of protection registers
  s390/cmma: fix detection of DAT pages
  s390/mm: fix phys vs virt confusion in mark_kernel_pXd() functions family
  smb3: fix touch -h of symlink
  net: ravb: Start TX queues after HW initialization succeeded
  ravb: Fix races between ravb_tx_timeout_work() and net related ops
  ipv4: igmp: fix refcnt uaf issue when receiving igmp query packet
  Input: xpad - add HyperX Clutch Gladiate Support
  btrfs: send: ensure send_fd is writable
  btrfs: fix off-by-one when checking chunk map includes logical address
  powerpc: Don't clobber f0/vs0 during fp|altivec register save
  bcache: revert replacing IS_ERR_OR_NULL with IS_ERR
  dm verity: don't perform FEC for failed readahead IO
  dm-verity: align struct dm_verity_fec_io properly
  ALSA: hda/realtek: Headset Mic VREF to 100%
  ALSA: hda: Disable power-save on KONTRON SinglePC
  mmc: block: Do not lose cache flush during CQE error recovery
  firewire: core: fix possible memory leak in create_units()
  pinctrl: avoid reload of p state in list iteration
  USB: dwc3: qcom: fix wakeup after probe deferral
  usb: dwc3: set the dma max_seg_size
  USB: dwc2: write HCINT with INTMASK applied
  USB: serial: option: don't claim interface 4 for ZTE MF290
  USB: serial: option: fix FM101R-GL defines
  USB: serial: option: add Fibocom L7xx modules
  bcache: prevent potential division by zero error
  bcache: check return value from btree_node_alloc_replacement()
  dm-delay: fix a race between delay_presuspend and delay_bio
  hv_netvsc: Mark VF as slave before exposing it to user-mode
  hv_netvsc: Fix race of register_netdevice_notifier and VF register
  USB: serial: option: add Luat Air72*U series products
  s390/dasd: protect device queue against concurrent access
  bcache: replace a mistaken IS_ERR() by IS_ERR_OR_NULL() in btree_gc_coalesce()
  mtd: rawnand: brcmnand: Fix ecc chunk calculation for erased page bitfips
  KVM: arm64: limit PMU version to PMUv3 for ARMv8.1
  arm64: cpufeature: Extract capped perfmon fields
  MIPS: KVM: Fix a build warning about variable set but not used
  net: axienet: Fix check for partial TX checksum
  amd-xgbe: propagate the correct speed and duplex status
  amd-xgbe: handle the corner-case during tx completion
  amd-xgbe: handle corner-case during sfp hotplug
  arm/xen: fix xen_vcpu_info allocation alignment
  net: usb: ax88179_178a: fix failed operations during ax88179_reset
  ipv4: Correct/silence an endian warning in __ip_do_redirect
  HID: fix HID device resource race between HID core and debugging support
  HID: core: store the unique system identifier in hid_device
  drm/rockchip: vop: Fix color for RGB888/BGR888 format on VOP full
  ata: pata_isapnp: Add missing error check for devm_ioport_map()
  drm/panel: simple: Fix Innolux G101ICE-L01 timings
  RDMA/irdma: Prevent zero-length STAG registration
  driver core: Release all resources during unbind before updating device links

 Conflicts:
	drivers/mmc/host/cqhci.c
	drivers/net/usb/ax88179_178a.c
	drivers/usb/dwc3/core.c
	scripts/checkpatch.pl

Change-Id: I571c71df4f4c1c612d4101c9b9c2b901b4408103
2024-01-13 21:09:02 +02: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
cd086b6516 This is the 4.19.302 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmV53vEACgkQONu9yGCS
 aT4wng/9ECVr1tNbX+0oo5p4GFnY2wR3I39TslGkS048Yo1UiW/m7WX2nDJPhJXO
 YLLiSsm0xOKZEn1xDh99L5kIWZHeHywajMdrIDZwRhOtBj8RHX0NyWQQzxg2ftxs
 7IrgXyt/38b6kcQ2or8rqPqINGeZWAErukMfGMQZIMkp48D68cyfPDk0xfFwryAL
 mfn1tQOe6OgPFSbNR7MiV1mWzC6f06J6ZOx3kUvS6tqu0ZF61yhE8QkB/U2dQb/z
 S7VTM4BQ5NuW9BiGfLF39OAppEZ7jB/JZjCzh5h2ZUWpKhxl09u5FFqT81fOqtBN
 b/rhPnNnG1gFarGChrRbdvU4YnomBce7f7knpe0/vUiZW+UBxIW5yagUoXz7Eo0X
 Lyowuj5bXhDAJ1T/G/AV8Fv0eIunBRUyXcdeF6qeHWV2NzDmcYbswY6gh5eWDZL3
 ST83NvEq+p5uGzZHEbjbP3AX0P5wHDPAkhLXKLCwTsylHKrfL12e1+FWY2Jv40PA
 Ze+8SNCZrdHIYXZWSczrGZJM+GJh1KCkOQt/wSkGzPPAmoqcOTyMqD7Tj7o8qUER
 lQGDYzEO7+ZGMQ3QtSqQ//3Mlaeh4JYjzEYgpuXA7bFeepn/9FVDUurKZW39A/o5
 0TTWsgwRlt2j92Jfi8ajbT5aAVJ0+o6KFqElUhc2onMMEWngUXs=
 =Ryx9
 -----END PGP SIGNATURE-----

Merge 4.19.302 into android-4.19-stable

Changes in 4.19.302
	spi: imx: add a device specific prepare_message callback
	spi: imx: move wml setting to later than setup_transfer
	spi: imx: correct wml as the last sg length
	spi: imx: mx51-ecspi: Move some initialisation to prepare_message hook.
	media: davinci: vpif_capture: fix potential double free
	hrtimers: Push pending hrtimers away from outgoing CPU earlier
	netfilter: ipset: fix race condition between swap/destroy and kernel side add/del/test
	tg3: Move the [rt]x_dropped counters to tg3_napi
	tg3: Increment tx_dropped in tg3_tso_bug()
	kconfig: fix memory leak from range properties
	drm/amdgpu: correct chunk_ptr to a pointer to chunk.
	ipv6: fix potential NULL deref in fib6_add()
	hv_netvsc: rndis_filter needs to select NLS
	net: arcnet: Fix RESET flag handling
	net: arcnet: com20020 fix error handling
	arcnet: restoring support for multiple Sohard Arcnet cards
	ipv4: ip_gre: Avoid skb_pull() failure in ipgre_xmit()
	net: hns: fix fake link up on xge port
	netfilter: xt_owner: Add supplementary groups option
	netfilter: xt_owner: Fix for unsafe access of sk->sk_socket
	tcp: do not accept ACK of bytes we never sent
	RDMA/bnxt_re: Correct module description string
	hwmon: (acpi_power_meter) Fix 4.29 MW bug
	tracing: Fix a warning when allocating buffered events fails
	scsi: be2iscsi: Fix a memleak in beiscsi_init_wrb_handle()
	ARM: imx: Check return value of devm_kasprintf in imx_mmdc_perf_init
	ARM: dts: imx: make gpt node name generic
	ARM: dts: imx7: Declare timers compatible with fsl,imx6dl-gpt
	ALSA: pcm: fix out-of-bounds in snd_pcm_state_names
	packet: Move reference count in packet_sock to atomic_long_t
	nilfs2: prevent WARNING in nilfs_sufile_set_segment_usage()
	tracing: Always update snapshot buffer size
	tracing: Fix incomplete locking when disabling buffered events
	tracing: Fix a possible race when disabling buffered events
	perf/core: Add a new read format to get a number of lost samples
	perf: Fix perf_event_validate_size()
	gpiolib: sysfs: Fix error handling on failed export
	usb: gadget: f_hid: fix report descriptor allocation
	parport: Add support for Brainboxes IX/UC/PX parallel cards
	usb: typec: class: fix typec_altmode_put_partner to put plugs
	serial: sc16is7xx: address RX timeout interrupt errata
	serial: 8250_omap: Add earlycon support for the AM654 UART controller
	x86/CPU/AMD: Check vendor in the AMD microcode callback
	KVM: s390/mm: Properly reset no-dat
	nilfs2: fix missing error check for sb_set_blocksize call
	netlink: don't call ->netlink_bind with table lock held
	genetlink: add CAP_NET_ADMIN test for multicast bind
	psample: Require 'CAP_NET_ADMIN' when joining "packets" group
	drop_monitor: Require 'CAP_SYS_ADMIN' when joining "events" group
	tools headers UAPI: Sync linux/perf_event.h with the kernel sources
	IB/isert: Fix unaligned immediate-data handling
	devcoredump : Serialize devcd_del work
	devcoredump: Send uevent once devcd is ready
	Linux 4.19.302

Change-Id: If04a1c5d3950ac7c1cbe4b71df951dcf3e8e8ed1
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-12-14 09:05:30 +00:00
Eric Dumazet
22a9d50474 ipv6: fix potential NULL deref in fib6_add()
[ Upstream commit 75475bb51e78a3f54ad2f69380f2a1c985e85f2d ]

If fib6_find_prefix() returns NULL, we should silently fallback
using fib6_null_entry regardless of RT6_DEBUG value.

syzbot reported:

WARNING: CPU: 0 PID: 5477 at net/ipv6/ip6_fib.c:1516 fib6_add+0x310d/0x3fa0 net/ipv6/ip6_fib.c:1516
Modules linked in:
CPU: 0 PID: 5477 Comm: syz-executor.0 Not tainted 6.7.0-rc2-syzkaller-00029-g9b6de136b5f0 #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 11/10/2023
RIP: 0010:fib6_add+0x310d/0x3fa0 net/ipv6/ip6_fib.c:1516
Code: 00 48 8b 54 24 68 e8 42 22 00 00 48 85 c0 74 14 49 89 c6 e8 d5 d3 c2 f7 eb 5d e8 ce d3 c2 f7 e9 ca 00 00 00 e8 c4 d3 c2 f7 90 <0f> 0b 90 48 b8 00 00 00 00 00 fc ff df 48 8b 4c 24 38 80 3c 01 00
RSP: 0018:ffffc90005067740 EFLAGS: 00010293
RAX: ffffffff89cba5bc RBX: ffffc90005067ab0 RCX: ffff88801a2e9dc0
RDX: 0000000000000000 RSI: 0000000000000001 RDI: 0000000000000000
RBP: ffffc90005067980 R08: ffffffff89cbca85 R09: 1ffff110040d4b85
R10: dffffc0000000000 R11: ffffed10040d4b86 R12: 00000000ffffffff
R13: 1ffff110051c3904 R14: ffff8880206a5c00 R15: ffff888028e1c820
FS: 00007f763783c6c0(0000) GS:ffff8880b9800000(0000) knlGS:0000000000000000
CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 00007f763783bff8 CR3: 000000007f74d000 CR4: 00000000003506f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000fffe0ff0 DR7: 0000000000000400
Call Trace:
<TASK>
__ip6_ins_rt net/ipv6/route.c:1303 [inline]
ip6_route_add+0x88/0x120 net/ipv6/route.c:3847
ipv6_route_ioctl+0x525/0x7b0 net/ipv6/route.c:4467
inet6_ioctl+0x21a/0x270 net/ipv6/af_inet6.c:575
sock_do_ioctl+0x152/0x460 net/socket.c:1220
sock_ioctl+0x615/0x8c0 net/socket.c:1339
vfs_ioctl fs/ioctl.c:51 [inline]
__do_sys_ioctl fs/ioctl.c:871 [inline]
__se_sys_ioctl+0xf8/0x170 fs/ioctl.c:857
do_syscall_x64 arch/x86/entry/common.c:51 [inline]
do_syscall_64+0x45/0x110 arch/x86/entry/common.c:82

Fixes: 7bbfe00e02 ("ipv6: fix general protection fault in fib6_add()")
Reported-by: syzbot <syzkaller@googlegroups.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Wei Wang <weiwan@google.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://lore.kernel.org/r/20231129160630.3509216-1-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-12-13 17:42:16 +01:00
Greg Kroah-Hartman
4579df0c74 Merge 4.19.299 into android-4.19-stable
Changes in 4.19.299
	vfs: fix readahead(2) on block devices
	genirq/matrix: Exclude managed interrupts in irq_matrix_allocated()
	i40e: fix potential memory leaks in i40e_remove()
	tcp_metrics: add missing barriers on delete
	tcp_metrics: properly set tp->snd_ssthresh in tcp_init_metrics()
	tcp_metrics: do not create an entry from tcp_init_metrics()
	wifi: rtlwifi: fix EDCA limit set by BT coexistence
	can: dev: move driver related infrastructure into separate subdir
	can: dev: can_restart(): don't crash kernel if carrier is OK
	can: dev: can_restart(): fix race condition between controller restart and netif_carrier_on()
	thermal: core: prevent potential string overflow
	chtls: fix tp->rcv_tstamp initialization
	ACPI: sysfs: Fix create_pnp_modalias() and create_of_modalias()
	ipv6: avoid atomic fragment on GSO packets
	macsec: Fix traffic counters/statistics
	macsec: use DEV_STATS_INC()
	net: add DEV_STATS_READ() helper
	ipvlan: properly track tx_errors
	regmap: debugfs: Fix a erroneous check after snprintf()
	clk: qcom: clk-rcg2: Fix clock rate overflow for high parent frequencies
	clk: keystone: pll: fix a couple NULL vs IS_ERR() checks
	clk: npcm7xx: Fix incorrect kfree
	clk: mediatek: clk-mt6797: Add check for mtk_alloc_clk_data
	clk: mediatek: clk-mt2701: Add check for mtk_alloc_clk_data
	platform/x86: wmi: Fix probe failure when failing to register WMI devices
	platform/x86: wmi: remove unnecessary initializations
	platform/x86: wmi: Fix opening of char device
	hwmon: (coretemp) Fix potentially truncated sysfs attribute name
	drm/rockchip: vop: Fix reset of state in duplicate state crtc funcs
	drm/radeon: possible buffer overflow
	drm/rockchip: cdn-dp: Fix some error handling paths in cdn_dp_probe()
	ARM: dts: qcom: mdm9615: populate vsdcc fixed regulator
	firmware: ti_sci: Mark driver as non removable
	clk: scmi: Free scmi_clk allocated when the clocks with invalid info are skipped
	hwrng: geode - fix accessing registers
	sched/rt: Provide migrate_disable/enable() inlines
	nd_btt: Make BTT lanes preemptible
	HID: cp2112: Use irqchip template
	hid: cp2112: Fix duplicate workqueue initialization
	ARM: 9321/1: memset: cast the constant byte to unsigned char
	ext4: move 'ix' sanity check to corrent position
	RDMA/hfi1: Workaround truncation compilation error
	sh: bios: Revive earlyprintk support
	ASoC: Intel: Skylake: Fix mem leak when parsing UUIDs fails
	ASoC: ams-delta.c: use component after check
	mfd: dln2: Fix double put in dln2_probe
	leds: pwm: simplify if condition
	leds: pwm: convert to atomic PWM API
	leds: pwm: Don't disable the PWM when the LED should be off
	ledtrig-cpu: Limit to 8 CPUs
	leds: trigger: ledtrig-cpu:: Fix 'output may be truncated' issue for 'cpu'
	tty: tty_jobctrl: fix pid memleak in disassociate_ctty()
	usb: dwc2: fix possible NULL pointer dereference caused by driver concurrency
	dmaengine: ti: edma: handle irq_of_parse_and_map() errors
	misc: st_core: Do not call kfree_skb() under spin_lock_irqsave()
	tools: iio: privatize globals and functions in iio_generic_buffer.c file
	tools: iio: iio_generic_buffer: Fix some integer type and calculation
	tools: iio: iio_generic_buffer ensure alignment
	USB: usbip: fix stub_dev hub disconnect
	dmaengine: pxa_dma: Remove an erroneous BUG_ON() in pxad_free_desc()
	f2fs: fix to initialize map.m_pblk in f2fs_precache_extents()
	pcmcia: cs: fix possible hung task and memory leak pccardd()
	pcmcia: ds: fix refcount leak in pcmcia_device_add()
	pcmcia: ds: fix possible name leak in error path in pcmcia_device_add()
	media: bttv: fix use after free error due to btv->timeout timer
	media: s3c-camif: Avoid inappropriate kfree()
	media: dvb-usb-v2: af9035: fix missing unlock
	pwm: sti: Avoid conditional gotos
	pwm: sti: Reduce number of allocations and drop usage of chip_data
	pwm: brcmstb: Utilize appropriate clock APIs in suspend/resume
	Input: synaptics-rmi4 - fix use after free in rmi_unregister_function()
	llc: verify mac len before reading mac header
	tipc: Change nla_policy for bearer-related names to NLA_NUL_STRING
	dccp: Call security_inet_conn_request() after setting IPv4 addresses.
	dccp/tcp: Call security_inet_conn_request() after setting IPv6 addresses.
	r8169: improve rtl_set_rx_mode
	net: r8169: Disable multicast filter for RTL8168H and RTL8107E
	net/smc: postpone release of clcsock
	net/smc: wait for pending work before clcsock release_sock
	net/smc: fix dangling sock under state SMC_APPFINCLOSEWAIT
	tg3: power down device only on SYSTEM_POWER_OFF
	r8169: respect userspace disabling IFF_MULTICAST
	netfilter: xt_recent: fix (increase) ipv6 literal buffer length
	fbdev: imsttfb: Fix error path of imsttfb_probe()
	fbdev: imsttfb: fix a resource leak in probe
	fbdev: fsl-diu-fb: mark wr_reg_wa() static
	Revert "mmc: core: Capture correct oemid-bits for eMMC cards"
	btrfs: use u64 for buffer sizes in the tree search ioctls
	Linux 4.19.299

Change-Id: I130ef8f6fcd9ce2815d8b2493f96082376730758
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-11-26 12:52:14 +00:00
Kuniyuki Iwashima
8b3639cb78 dccp/tcp: Call security_inet_conn_request() after setting IPv6 addresses.
[ Upstream commit 23be1e0e2a83a8543214d2599a31d9a2185a796b ]

Initially, commit 4237c75c0a ("[MLSXFRM]: Auto-labeling of child
sockets") introduced security_inet_conn_request() in some functions
where reqsk is allocated.  The hook is added just after the allocation,
so reqsk's IPv6 remote address was not initialised then.

However, SELinux/Smack started to read it in netlbl_req_setattr()
after commit e1adea9270 ("calipso: Allow request sockets to be
relabelled by the lsm.").

Commit 284904aa79 ("lsm: Relocate the IPv4 security_inet_conn_request()
hooks") fixed that kind of issue only in TCPv4 because IPv6 labeling was
not supported at that time.  Finally, the same issue was introduced again
in IPv6.

Let's apply the same fix on DCCPv6 and TCPv6.

Fixes: e1adea9270 ("calipso: Allow request sockets to be relabelled by the lsm.")
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Acked-by: Paul Moore <paul@paul-moore.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-11-20 10:29:21 +01:00
Yan Zhai
c9faed4c8c ipv6: avoid atomic fragment on GSO packets
[ Upstream commit 03d6c848bfb406e9ef6d9846d759e97beaeea113 ]

When the ipv6 stack output a GSO packet, if its gso_size is larger than
dst MTU, then all segments would be fragmented. However, it is possible
for a GSO packet to have a trailing segment with smaller actual size
than both gso_size as well as the MTU, which leads to an "atomic
fragment". Atomic fragments are considered harmful in RFC-8021. An
Existing report from APNIC also shows that atomic fragments are more
likely to be dropped even it is equivalent to a no-op [1].

Add an extra check in the GSO slow output path. For each segment from
the original over-sized packet, if it fits with the path MTU, then avoid
generating an atomic fragment.

Link: https://www.potaroo.net/presentations/2022-03-01-ipv6-frag.pdf [1]
Fixes: b210de4f8c97 ("net: ipv6: Validate GSO SKB before finish IPv6 processing")
Reported-by: David Wragg <dwragg@cloudflare.com>
Signed-off-by: Yan Zhai <yan@cloudflare.com>
Link: https://lore.kernel.org/r/90912e3503a242dca0bc36958b11ed03a2696e5e.1698156966.git.yan@cloudflare.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-11-20 10:29:17 +01:00
Michael Bestas
9cd6ae99b7
Merge tag 'ASB-2023-11-05_4.19-stable' of https://android.googlesource.com/kernel/common into android13-4.19-kona
https://source.android.com/docs/security/bulletin/2023-11-01

* tag 'ASB-2023-11-05_4.19-stable' of https://android.googlesource.com/kernel/common:
  Reapply "perf: Disallow mis-matched inherited group reads"
  Revert "perf: Disallow mis-matched inherited group reads"
  Revert "xfrm: fix a data-race in xfrm_gen_index()"
  Revert "Bluetooth: hci_core: Fix build warnings"
  Revert "xfrm: interface: use DEV_STATS_INC()"
  Linux 4.19.297
  xfrm6: fix inet6_dev refcount underflow problem
  Bluetooth: hci_sock: Correctly bounds check and pad HCI_MON_NEW_INDEX name
  Bluetooth: hci_sock: fix slab oob read in create_monitor_event
  phy: mapphone-mdm6600: Fix runtime PM for remove
  ASoC: pxa: fix a memory leak in probe()
  gpio: vf610: set value before the direction to avoid a glitch
  s390/pci: fix iommu bitmap allocation
  perf: Disallow mis-matched inherited group reads
  USB: serial: option: add Fibocom to DELL custom modem FM101R-GL
  USB: serial: option: add entry for Sierra EM9191 with new firmware
  USB: serial: option: add Telit LE910C4-WWX 0x1035 composition
  ACPI: irq: Fix incorrect return value in acpi_register_gsi()
  Revert "pinctrl: avoid unsafe code pattern in find_pinctrl()"
  mmc: core: Capture correct oemid-bits for eMMC cards
  mtd: spinand: micron: correct bitmask for ecc status
  mtd: rawnand: qcom: Unmap the right resource upon probe failure
  Bluetooth: hci_event: Fix using memcmp when comparing keys
  btrfs: fix some -Wmaybe-uninitialized warnings in ioctl.c
  drm: panel-orientation-quirks: Add quirk for One Mix 2S
  sky2: Make sure there is at least one frag_addr available
  wifi: cfg80211: avoid leaking stack data into trace
  wifi: mac80211: allow transmitting EAPOL frames with tainted key
  Bluetooth: hci_core: Fix build warnings
  Bluetooth: Avoid redundant authentication
  HID: holtek: fix slab-out-of-bounds Write in holtek_kbd_input_event
  tracing: relax trace_event_eval_update() execution with cond_resched()
  ata: libata-eh: Fix compilation warning in ata_eh_link_report()
  gpio: timberdale: Fix potential deadlock on &tgpio->lock
  overlayfs: set ctime when setting mtime and atime
  i2c: mux: Avoid potential false error message in i2c_mux_add_adapter
  btrfs: initialize start_slot in btrfs_log_prealloc_extents
  btrfs: return -EUCLEAN for delayed tree ref with a ref count not equals to 1
  ARM: dts: ti: omap: Fix noisy serial with overrun-throttle-ms for mapphone
  libceph: use kernel_connect()
  libceph: fix unaligned accesses in ceph_entity_addr handling
  net: pktgen: Fix interface flags printing
  netfilter: nft_set_rbtree: .deactivate fails if element has expired
  net/sched: sch_hfsc: upgrade 'rt' to 'sc' when it becomes a inner curve
  i40e: prevent crash on probe if hw registers have invalid values
  net: usb: smsc95xx: Fix an error code in smsc95xx_reset()
  tcp: tsq: relax tcp_small_queue_check() when rtx queue contains a single skb
  tcp: fix excessive TLP and RACK timeouts from HZ rounding
  net: rfkill: gpio: prevent value glitch during probe
  net: ipv6: fix return value check in esp_remove_trailer
  net: ipv4: fix return value check in esp_remove_trailer
  xfrm: interface: use DEV_STATS_INC()
  xfrm: fix a data-race in xfrm_gen_index()
  netfilter: nft_payload: fix wrong mac header matching
  KVM: x86: Mask LVTPC when handling a PMI
  regmap: fix NULL deref on lookup
  nfc: nci: fix possible NULL pointer dereference in send_acknowledge()
  Bluetooth: avoid memcmp() out of bounds warning
  Bluetooth: hci_event: Fix coding style
  Bluetooth: vhci: Fix race when opening vhci device
  Bluetooth: Fix a refcnt underflow problem for hci_conn
  Bluetooth: Reject connection with the device which has same BD_ADDR
  Bluetooth: hci_event: Ignore NULL link key
  usb: hub: Guard against accesses to uninitialized BOS descriptors
  dev_forward_skb: do not scrub skb mark within the same name space
  x86/alternatives: Disable KASAN in apply_alternatives()
  powerpc/64e: Fix wrong test in __ptep_test_and_clear_young()
  usb: gadget: ncm: Handle decoding of multiple NTB's in unwrap call
  usb: gadget: udc-xilinx: replace memcpy with memcpy_toio
  x86/cpu: Fix AMD erratum #1485 on Zen4-based CPUs
  pinctrl: avoid unsafe code pattern in find_pinctrl()
  cgroup: Remove duplicates in cgroup v1 tasks file
  Input: xpad - add PXN V900 support
  Input: psmouse - fix fast_reconnect function for PS/2 mode
  Input: powermate - fix use-after-free in powermate_config_complete
  ceph: fix incorrect revoked caps assert in ceph_fill_file_size()
  mcb: remove is_added flag from mcb_device struct
  iio: pressure: ms5611: ms5611_prom_is_valid false negative bug
  iio: pressure: bmp280: Fix NULL pointer exception
  usb: musb: Modify the "HWVers" register address
  usb: musb: Get the musb_qh poniter after musb_giveback
  usb: dwc3: Soft reset phy on probe for host
  net: usb: dm9601: fix uninitialized variable use in dm9601_mdio_read
  usb: xhci: xhci-ring: Use sysdev for mapping bounce buffer
  dmaengine: stm32-mdma: abort resume if no ongoing transfer
  sched,idle,rcu: Push rcu_idle deeper into the idle path
  workqueue: Override implicit ordered attribute in workqueue_apply_unbound_cpumask()
  nfc: nci: assert requested protocol is valid
  net: nfc: fix races in nfc_llcp_sock_get() and nfc_llcp_sock_get_sn()
  ixgbe: fix crash with empty VF macvlan list
  drm/vmwgfx: fix typo of sizeof argument
  xen-netback: use default TX queue size for vifs
  ieee802154: ca8210: Fix a potential UAF in ca8210_probe
  drm/msm/dsi: skip the wait for video mode done if not applicable
  drm: etvnaviv: fix bad backport leading to warning
  net: prevent address rewrite in kernel_bind()
  quota: Fix slow quotaoff
  HID: logitech-hidpp: Fix kernel crash on receiver USB disconnect
  RDMA/cxgb4: Check skb value for failure to allocate
  net: prevent rewrite of msg_name in sock_sendmsg()
  net: fix kernel-doc warnings for socket.c
  net: use indirect calls helpers at the socket layer
  indirect call wrappers: helpers to speed-up indirect calls of builtin
  Revert "net: add atomic_long_t to net_device_stats fields"
  Revert "net: Fix unwanted sign extension in netdev_stats_to_stats64()"
  Revert "net: bridge: use DEV_STATS_INC()"
  Linux 4.19.296
  xen/events: replace evtchn_rwlock with RCU
  rtnetlink: Reject negative ifindexes in RTM_NEWLINK
  Revert "rtnetlink: Reject negative ifindexes in RTM_NEWLINK"
  dccp: fix dccp_v4_err()/dccp_v6_err() again
  parisc: Restore __ldcw_align for PA-RISC 2.0 processors
  RDMA/mlx5: Fix NULL string error
  RDMA/cma: Fix truncation compilation warning in make_cma_ports
  gpio: pxa: disable pinctrl calls for MMP_GPIO
  gpio: aspeed: fix the GPIO number passed to pinctrl_gpio_set_config()
  IB/mlx4: Fix the size of a buffer in add_port_entries()
  cpupower: add Makefile dependencies for install targets
  sctp: update hb timer immediately after users change hb_interval
  sctp: update transport state when processing a dupcook packet
  tcp: fix delayed ACKs for MSS boundary condition
  tcp: fix quick-ack counting to count actual ACKs of new data
  net: stmmac: dwmac-stm32: fix resume on STM32 MCU
  net: usb: smsc75xx: Fix uninit-value access in __smsc75xx_read_reg
  ipv4, ipv6: Fix handling of transhdrlen in __ip{,6}_append_data()
  modpost: add missing else to the "of" check
  scsi: target: core: Fix deadlock due to recursive locking
  regmap: rbtree: Fix wrong register marked as in-cache when creating new node
  drivers/net: process the result of hdlc_open() and add call of hdlc_close() in uhdlc_close()
  wifi: mwifiex: Fix oob check condition in mwifiex_process_rx_packet
  ubi: Refuse attaching if mtd's erasesize is 0
  net: replace calls to sock->ops->connect() with kernel_connect()
  wifi: mwifiex: Fix tlv_buf_left calculation
  qed/red_ll2: Fix undefined behavior bug in struct qed_ll2_info
  scsi: zfcp: Fix a double put in zfcp_port_enqueue()
  Revert "PCI: qcom: Disable write access to read only registers for IP v2.3.3"
  media: dvb: symbol fixup for dvb_attach() - again
  Revert "drivers core: Use sysfs_emit and sysfs_emit_at for show(device *...) functions"
  ata: libata: disallow dev-initiated LPM transitions to unsupported states
  ext4: fix rec_len verify error
  fs: binfmt_elf_efpic: fix personality for ELF-FDPIC
  ata: libata-sata: increase PMP SRST timeout to 10s
  ata: libata-core: Do not register PM operations for SAS ports
  ata: libata-core: Fix port and device removal
  ata: libata-core: Fix ata_port_request_pm() locking
  net: thunderbolt: Fix TCPv6 GSO checksum calculation
  btrfs: properly report 0 avail for very full file systems
  i2c: i801: unregister tco_pdev in i801_probe() error path
  ata: libata-scsi: ignore reserved bits for REPORT SUPPORTED OPERATION CODES
  ALSA: hda: Disable power save for solving pop issue on Lenovo ThinkCentre M70q
  nilfs2: fix potential use after free in nilfs_gccache_submit_read_data()
  serial: 8250_port: Check IRQ data before use
  smack: Record transmuting in smk_transmuted
  smack: Retrieve transmuting information in smack_inode_getsecurity()
  Smack:- Use overlay inode label in smack_inode_copy_up()
  scsi: megaraid_sas: Enable msix_load_balance for Invader and later controllers
  net: Fix unwanted sign extension in netdev_stats_to_stats64()
  watchdog: iTCO_wdt: Set NO_REBOOT if the watchdog is not already running
  watchdog: iTCO_wdt: No need to stop the timer in probe
  nvme-pci: do not set the NUMA node of device if it has none
  fbdev/sh7760fb: Depend on FB=y
  bpf: Clarify error expectations from bpf_clone_redirect
  ata: libata-eh: do not clear ATA_PFLAG_EH_PENDING in ata_eh_reset()
  ring-buffer: Avoid softlockup in ring_buffer_resize()
  selftests/ftrace: Correctly enable event in instance-event.tc
  parisc: irq: Make irq_stack_union static to avoid sparse warning
  parisc: drivers: Fix sparse warning
  parisc: iosapic.c: Fix sparse warnings
  parisc: sba: Fix compile warning wrt list of SBA devices
  gpio: pmic-eic-sprd: Add can_sleep flag for PMIC EIC chip
  ARM: dts: ti: omap: motorola-mapphone: Fix abe_clkctrl warning on boot
  clk: tegra: fix error return case for recalc_rate
  MIPS: Alchemy: only build mmc support helpers if au1xmmc is enabled
  ext4: do not let fstrim block system suspend
  ext4: move setting of trimmed bit into ext4_try_to_trim_range()
  ext4: replace the traditional ternary conditional operator with with max()/min()
  ext4: mark group as trimmed only if it was fully scanned
  ext4: change s_last_trim_minblks type to unsigned long
  ext4: scope ret locally in ext4_try_to_trim_range()
  ext4: add new helper interface ext4_try_to_trim_range()
  ext4: remove the 'group' parameter of ext4_trim_extent
  scsi: megaraid_sas: Fix deadlock on firmware crashdump
  scsi: megaraid_sas: Load balance completions across all MSI-X
  scsi: qla2xxx: Remove unsupported ql2xenabledif option
  scsi: qla2xxx: Add protection mask module parameters
  Input: i8042 - add quirk for TUXEDO Gemini 17 Gen1/Clevo PD70PN
  i2c: mux: demux-pinctrl: check the return value of devm_kstrdup()
  gpio: tb10x: Fix an error handling path in tb10x_gpio_probe()
  team: fix null-ptr-deref when team device type is changed
  net: bridge: use DEV_STATS_INC()
  net: add atomic_long_t to net_device_stats fields
  net: hns3: add 5ms delay before clear firmware reset irq source
  powerpc/perf/hv-24x7: Update domain value check
  ipv4: fix null-deref in ipv4_link_failure
  selftests: tls: swap the TX and RX sockets in some tests
  selftests/tls: Add {} to avoid static checker warning
  netfilter: nf_tables: disallow element removal on anonymous sets
  ata: libahci: clear pending interrupt status
  ata: ahci: Drop pointless VPRINTK() calls and convert the remaining ones
  NFS/pNFS: Report EINVAL errors from connect() to the server
  ANDROID: ALSA: jack: Revert mismerge done in v4.19.291

 Conflicts:
	include/net/tcp.h
	kernel/events/core.c
	kernel/sched/idle.c

Change-Id: I141cc494dcfda5fbd11f8bd2f7166bf3bf157084
2023-11-09 14:55:01 +02:00
Greg Kroah-Hartman
24a799db09 This is the 4.19.297 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmU43RMACgkQONu9yGCS
 aT6DURAAlNjp1I2Hi2sO/hvlYcY6vkZHAIDof1SXqJkthU4Chd8fvinjxbHTcuRd
 vYGBB/u+fTjKiyRYFYiK2vLVQsD2YBIuP+bQtK3v1s+62qarGf+ahbFqRRlHIoRR
 dE3rglx7SMITaZPdq4KFuC1etM206+JR0yU7lTcdLocNQRmZv9DEnVTq6SGLebUB
 C0l+CaHy7F1yn1uuBVJi/gJH1+obTHyAViJzKY38E2Nevq8a0rUZd6V0xfGHUFue
 x41NX+pjUkaAyH8qKahFxdIuabE/oNBjt6ZqEmceu2bOrjFI36a3r2/XYfqNxkD8
 HT9qEz+jY0ig2Zj4TdGcjrm58Ck3ZjTS9RBodeaYBYlqz/EnlR8Qk7kspfXGACF9
 iy5WcL0iSMbC3o5dy17k2Dhh6G9ZmhLlpzXuHlLvfM3U1dlO0aa48LhAO7MTNu6N
 Abdyfqv1q4tSqsixUyVe2MQqAoZ7Px1FJRq5l24xvqKljNKFOgBnw9sjKfcRfG1K
 O2F1dvEzLjFNxn7P+iZMfdoyg2Hf+GQ0gtLmq9fK04uAGW8UQRu51efJmujLZ42b
 XVeAI4iw+uR1bFt9YI+WeAx3vg/lzP768+2YPf0zWUDf2k7RORvnP4XUZbddajet
 fhqakuVIORwc53IM5m2XtMs7N88sWFrprbqjyoUPJYcgpzQyyOo=
 =0+07
 -----END PGP SIGNATURE-----

Merge 4.19.297 into android-4.19-stable

Changes in 4.19.297
	indirect call wrappers: helpers to speed-up indirect calls of builtin
	net: use indirect calls helpers at the socket layer
	net: fix kernel-doc warnings for socket.c
	net: prevent rewrite of msg_name in sock_sendmsg()
	RDMA/cxgb4: Check skb value for failure to allocate
	HID: logitech-hidpp: Fix kernel crash on receiver USB disconnect
	quota: Fix slow quotaoff
	net: prevent address rewrite in kernel_bind()
	drm: etvnaviv: fix bad backport leading to warning
	drm/msm/dsi: skip the wait for video mode done if not applicable
	ieee802154: ca8210: Fix a potential UAF in ca8210_probe
	xen-netback: use default TX queue size for vifs
	drm/vmwgfx: fix typo of sizeof argument
	ixgbe: fix crash with empty VF macvlan list
	net: nfc: fix races in nfc_llcp_sock_get() and nfc_llcp_sock_get_sn()
	nfc: nci: assert requested protocol is valid
	workqueue: Override implicit ordered attribute in workqueue_apply_unbound_cpumask()
	sched,idle,rcu: Push rcu_idle deeper into the idle path
	dmaengine: stm32-mdma: abort resume if no ongoing transfer
	usb: xhci: xhci-ring: Use sysdev for mapping bounce buffer
	net: usb: dm9601: fix uninitialized variable use in dm9601_mdio_read
	usb: dwc3: Soft reset phy on probe for host
	usb: musb: Get the musb_qh poniter after musb_giveback
	usb: musb: Modify the "HWVers" register address
	iio: pressure: bmp280: Fix NULL pointer exception
	iio: pressure: ms5611: ms5611_prom_is_valid false negative bug
	mcb: remove is_added flag from mcb_device struct
	ceph: fix incorrect revoked caps assert in ceph_fill_file_size()
	Input: powermate - fix use-after-free in powermate_config_complete
	Input: psmouse - fix fast_reconnect function for PS/2 mode
	Input: xpad - add PXN V900 support
	cgroup: Remove duplicates in cgroup v1 tasks file
	pinctrl: avoid unsafe code pattern in find_pinctrl()
	x86/cpu: Fix AMD erratum #1485 on Zen4-based CPUs
	usb: gadget: udc-xilinx: replace memcpy with memcpy_toio
	usb: gadget: ncm: Handle decoding of multiple NTB's in unwrap call
	powerpc/64e: Fix wrong test in __ptep_test_and_clear_young()
	x86/alternatives: Disable KASAN in apply_alternatives()
	dev_forward_skb: do not scrub skb mark within the same name space
	usb: hub: Guard against accesses to uninitialized BOS descriptors
	Bluetooth: hci_event: Ignore NULL link key
	Bluetooth: Reject connection with the device which has same BD_ADDR
	Bluetooth: Fix a refcnt underflow problem for hci_conn
	Bluetooth: vhci: Fix race when opening vhci device
	Bluetooth: hci_event: Fix coding style
	Bluetooth: avoid memcmp() out of bounds warning
	nfc: nci: fix possible NULL pointer dereference in send_acknowledge()
	regmap: fix NULL deref on lookup
	KVM: x86: Mask LVTPC when handling a PMI
	netfilter: nft_payload: fix wrong mac header matching
	xfrm: fix a data-race in xfrm_gen_index()
	xfrm: interface: use DEV_STATS_INC()
	net: ipv4: fix return value check in esp_remove_trailer
	net: ipv6: fix return value check in esp_remove_trailer
	net: rfkill: gpio: prevent value glitch during probe
	tcp: fix excessive TLP and RACK timeouts from HZ rounding
	tcp: tsq: relax tcp_small_queue_check() when rtx queue contains a single skb
	net: usb: smsc95xx: Fix an error code in smsc95xx_reset()
	i40e: prevent crash on probe if hw registers have invalid values
	net/sched: sch_hfsc: upgrade 'rt' to 'sc' when it becomes a inner curve
	netfilter: nft_set_rbtree: .deactivate fails if element has expired
	net: pktgen: Fix interface flags printing
	libceph: fix unaligned accesses in ceph_entity_addr handling
	libceph: use kernel_connect()
	ARM: dts: ti: omap: Fix noisy serial with overrun-throttle-ms for mapphone
	btrfs: return -EUCLEAN for delayed tree ref with a ref count not equals to 1
	btrfs: initialize start_slot in btrfs_log_prealloc_extents
	i2c: mux: Avoid potential false error message in i2c_mux_add_adapter
	overlayfs: set ctime when setting mtime and atime
	gpio: timberdale: Fix potential deadlock on &tgpio->lock
	ata: libata-eh: Fix compilation warning in ata_eh_link_report()
	tracing: relax trace_event_eval_update() execution with cond_resched()
	HID: holtek: fix slab-out-of-bounds Write in holtek_kbd_input_event
	Bluetooth: Avoid redundant authentication
	Bluetooth: hci_core: Fix build warnings
	wifi: mac80211: allow transmitting EAPOL frames with tainted key
	wifi: cfg80211: avoid leaking stack data into trace
	sky2: Make sure there is at least one frag_addr available
	drm: panel-orientation-quirks: Add quirk for One Mix 2S
	btrfs: fix some -Wmaybe-uninitialized warnings in ioctl.c
	Bluetooth: hci_event: Fix using memcmp when comparing keys
	mtd: rawnand: qcom: Unmap the right resource upon probe failure
	mtd: spinand: micron: correct bitmask for ecc status
	mmc: core: Capture correct oemid-bits for eMMC cards
	Revert "pinctrl: avoid unsafe code pattern in find_pinctrl()"
	ACPI: irq: Fix incorrect return value in acpi_register_gsi()
	USB: serial: option: add Telit LE910C4-WWX 0x1035 composition
	USB: serial: option: add entry for Sierra EM9191 with new firmware
	USB: serial: option: add Fibocom to DELL custom modem FM101R-GL
	perf: Disallow mis-matched inherited group reads
	s390/pci: fix iommu bitmap allocation
	gpio: vf610: set value before the direction to avoid a glitch
	ASoC: pxa: fix a memory leak in probe()
	phy: mapphone-mdm6600: Fix runtime PM for remove
	Bluetooth: hci_sock: fix slab oob read in create_monitor_event
	Bluetooth: hci_sock: Correctly bounds check and pad HCI_MON_NEW_INDEX name
	xfrm6: fix inet6_dev refcount underflow problem
	Linux 4.19.297

Change-Id: I495e8b8fbb6416ec3f94094fa905bdde364618b4
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-10-25 11:43:43 +00:00
Zhang Changzhong
0939d7817d xfrm6: fix inet6_dev refcount underflow problem
[ Upstream commit cc9b364bb1d58d3dae270c7a931a8cc717dc2b3b ]

There are race conditions that may lead to inet6_dev refcount underflow
in xfrm6_dst_destroy() and rt6_uncached_list_flush_dev().

One of the refcount underflow bugs is shown below:
	(cpu 1)                	|	(cpu 2)
xfrm6_dst_destroy()             |
  ...                           |
  in6_dev_put()                 |
				|  rt6_uncached_list_flush_dev()
  ...				|    ...
				|    in6_dev_put()
  rt6_uncached_list_del()       |    ...
  ...                           |

xfrm6_dst_destroy() calls rt6_uncached_list_del() after in6_dev_put(),
so rt6_uncached_list_flush_dev() has a chance to call in6_dev_put()
again for the same inet6_dev.

Fix it by moving in6_dev_put() after rt6_uncached_list_del() in
xfrm6_dst_destroy().

Fixes: 510c321b55 ("xfrm: reuse uncached_list to track xdsts")
Signed-off-by: Zhang Changzhong <zhangchangzhong@huawei.com>
Reviewed-by: Xin Long <lucien.xin@gmail.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-10-25 11:17:03 +02:00
Ma Ke
2756641a20 net: ipv6: fix return value check in esp_remove_trailer
commit dad4e491e30b20f4dc615c9da65d2142d703b5c2 upstream.

In esp_remove_trailer(), to avoid an unexpected result returned by
pskb_trim, we should check the return value of pskb_trim().

Signed-off-by: Ma Ke <make_ruc2021@163.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-10-25 11:16:45 +02: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
Alex Henrie
897bd8f582 net: ipv6/addrconf: avoid integer underflow in ipv6_create_tempaddr
[ Upstream commit f31867d0d9d82af757c1e0178b659438f4c1ea3c ]

The existing code incorrectly casted a negative value (the result of a
subtraction) to an unsigned value without checking. For example, if
/proc/sys/net/ipv6/conf/*/temp_prefered_lft was set to 1, the preferred
lifetime would jump to 4 billion seconds. On my machine and network the
shortest lifetime that avoided underflow was 3 seconds.

Fixes: 76506a986d ("IPv6: fix DESYNC_FACTOR")
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-09-23 10:48:13 +02:00
Yan Zhai
6d1c517985 lwt: Check LWTUNNEL_XMIT_CONTINUE strictly
[ Upstream commit a171fbec88a2c730b108c7147ac5e7b2f5a02b47 ]

LWTUNNEL_XMIT_CONTINUE is implicitly assumed in ip(6)_finish_output2,
such that any positive return value from a xmit hook could cause
unexpected continue behavior, despite that related skb may have been
freed. This could be error-prone for future xmit hook ops. One of the
possible errors is to return statuses of dst_output directly.

To make the code safer, redefine LWTUNNEL_XMIT_CONTINUE value to
distinguish from dst_output statuses and check the continue
condition explicitly.

Fixes: 3a0af8fd61 ("bpf: BPF for lightweight tunnel infrastructure")
Suggested-by: Dan Carpenter <dan.carpenter@linaro.org>
Signed-off-by: Yan Zhai <yan@cloudflare.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Link: https://lore.kernel.org/bpf/96b939b85eda00e8df4f7c080f770970a4c5f698.1692326837.git.yan@cloudflare.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-09-23 10:48:01 +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
Zhengchao Shao
fa6c6c04f6 ip6_vti: fix slab-use-after-free in decode_session6
[ Upstream commit 9fd41f1ba638938c9a1195d09bc6fa3be2712f25 ]

When ipv6_vti device is set to the qdisc of the sfb type, the cb field
of the sent skb may be modified during enqueuing. Then,
slab-use-after-free may occur when ipv6_vti device sends IPv6 packets.

The stack information is as follows:
BUG: KASAN: slab-use-after-free in decode_session6+0x103f/0x1890
Read of size 1 at addr ffff88802e08edc2 by task swapper/0/0
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 6.4.0-next-20230707-00001-g84e2cad7f979 #410
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.14.0-1.fc33 04/01/2014
Call Trace:
<IRQ>
dump_stack_lvl+0xd9/0x150
print_address_description.constprop.0+0x2c/0x3c0
kasan_report+0x11d/0x130
decode_session6+0x103f/0x1890
__xfrm_decode_session+0x54/0xb0
vti6_tnl_xmit+0x3e6/0x1ee0
dev_hard_start_xmit+0x187/0x700
sch_direct_xmit+0x1a3/0xc30
__qdisc_run+0x510/0x17a0
__dev_queue_xmit+0x2215/0x3b10
neigh_connected_output+0x3c2/0x550
ip6_finish_output2+0x55a/0x1550
ip6_finish_output+0x6b9/0x1270
ip6_output+0x1f1/0x540
ndisc_send_skb+0xa63/0x1890
ndisc_send_rs+0x132/0x6f0
addrconf_rs_timer+0x3f1/0x870
call_timer_fn+0x1a0/0x580
expire_timers+0x29b/0x4b0
run_timer_softirq+0x326/0x910
__do_softirq+0x1d4/0x905
irq_exit_rcu+0xb7/0x120
sysvec_apic_timer_interrupt+0x97/0xc0
</IRQ>
Allocated by task 9176:
kasan_save_stack+0x22/0x40
kasan_set_track+0x25/0x30
__kasan_slab_alloc+0x7f/0x90
kmem_cache_alloc_node+0x1cd/0x410
kmalloc_reserve+0x165/0x270
__alloc_skb+0x129/0x330
netlink_sendmsg+0x9b1/0xe30
sock_sendmsg+0xde/0x190
____sys_sendmsg+0x739/0x920
___sys_sendmsg+0x110/0x1b0
__sys_sendmsg+0xf7/0x1c0
do_syscall_64+0x39/0xb0
entry_SYSCALL_64_after_hwframe+0x63/0xcd
Freed by task 9176:
kasan_save_stack+0x22/0x40
kasan_set_track+0x25/0x30
kasan_save_free_info+0x2b/0x40
____kasan_slab_free+0x160/0x1c0
slab_free_freelist_hook+0x11b/0x220
kmem_cache_free+0xf0/0x490
skb_free_head+0x17f/0x1b0
skb_release_data+0x59c/0x850
consume_skb+0xd2/0x170
netlink_unicast+0x54f/0x7f0
netlink_sendmsg+0x926/0xe30
sock_sendmsg+0xde/0x190
____sys_sendmsg+0x739/0x920
___sys_sendmsg+0x110/0x1b0
__sys_sendmsg+0xf7/0x1c0
do_syscall_64+0x39/0xb0
entry_SYSCALL_64_after_hwframe+0x63/0xcd
The buggy address belongs to the object at ffff88802e08ed00
which belongs to the cache skbuff_small_head of size 640
The buggy address is located 194 bytes inside of
freed 640-byte region [ffff88802e08ed00, ffff88802e08ef80)

As commit f855691975 ("xfrm6: Fix the nexthdr offset in
_decode_session6.") showed, xfrm_decode_session was originally intended
only for the receive path. IP6CB(skb)->nhoff is not set during
transmission. Therefore, set the cb field in the skb to 0 before
sending packets.

Fixes: f855691975 ("xfrm6: Fix the nexthdr offset in _decode_session6.")
Signed-off-by: Zhengchao Shao <shaozhengchao@huawei.com>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-08-30 16:31:48 +02:00
Greg Kroah-Hartman
b2cb45e59d Merge 4.19.292 into android-4.19-stable
Changes in 4.19.292
	sparc: fix up arch_cpu_finalize_init() build breakage.
	mmc: moxart: read scr register without changing byte order
	ipv6: adjust ndisc_is_useropt() to also return true for PIO
	dmaengine: pl330: Return DMA_PAUSED when transaction is paused
	drm/nouveau/gr: enable memory loads on helper invocation on all channels
	radix tree test suite: fix incorrect allocation size for pthreads
	nilfs2: fix use-after-free of nilfs_root in dirtying inodes via iput
	iio: cros_ec: Fix the allocation size for cros_ec_command
	binder: fix memory leak in binder_init()
	usb-storage: alauda: Fix uninit-value in alauda_check_media()
	usb: dwc3: Properly handle processing of pending events
	x86/cpu/amd: Enable Zenbleed fix for AMD Custom APU 0405
	x86/mm: Fix VDSO and VVAR placement on 5-level paging machines
	x86: Move gds_ucode_mitigated() declaration to header
	drm/nouveau/disp: Revert a NULL check inside nouveau_connector_get_modes
	mISDN: Update parameter type of dsp_cmx_send()
	net/packet: annotate data-races around tp->status
	bonding: Fix incorrect deletion of ETH_P_8021AD protocol vid from slaves
	dccp: fix data-race around dp->dccps_mss_cache
	drivers: net: prevent tun_build_skb() to exceed the packet size limit
	IB/hfi1: Fix possible panic during hotplug remove
	wifi: cfg80211: fix sband iftype data lookup for AP_VLAN
	ibmvnic: Handle DMA unmapping of login buffs in release functions
	btrfs: don't stop integrity writeback too early
	netfilter: nf_tables: bogus EBUSY when deleting flowtable after flush
	netfilter: nf_tables: report use refcount overflow
	scsi: core: Fix legacy /proc parsing buffer overflow
	scsi: storvsc: Fix handling of virtual Fibre Channel timeouts
	scsi: 53c700: Check that command slot is not NULL
	scsi: snic: Fix possible memory leak if device_add() fails
	scsi: core: Fix possible memory leak if device_add() fails
	alpha: remove __init annotation from exported page_is_ram()
	sch_netem: fix issues in netem_change() vs get_dist_table()
	Linux 4.19.292

Change-Id: Ie4a1393c672e280631d9a0949e081f134dff3e3b
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-08-28 15:24:42 +00: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
Maciej Żenczykowski
f96e4cec6e ipv6: adjust ndisc_is_useropt() to also return true for PIO
commit 048c796beb6eb4fa3a5a647ee1c81f5c6f0f6a2a upstream.

The upcoming (and nearly finalized):
  https://datatracker.ietf.org/doc/draft-collink-6man-pio-pflag/
will update the IPv6 RA to include a new flag in the PIO field,
which will serve as a hint to perform DHCPv6-PD.

As we don't want DHCPv6 related logic inside the kernel, this piece of
information needs to be exposed to userspace.  The simplest option is to
simply expose the entire PIO through the already existing mechanism.

Even without this new flag, the already existing PIO R (router address)
flag (from RFC6275) cannot AFAICT be handled entirely in kernel,
and provides useful information that should be exposed to userspace
(the router's global address, for use by Mobile IPv6).

Also cc'ing stable@ for inclusion in LTS, as while technically this is
not quite a bugfix, and instead more of a feature, it is absolutely
trivial and the alternative is manually cherrypicking into all Android
Common Kernel trees - and I know Greg will ask for it to be sent in via
LTS instead...

Cc: Jen Linkova <furry@google.com>
Cc: Lorenzo Colitti <lorenzo@google.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@linux-ipv6.org>
Cc: stable@vger.kernel.org
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Link: https://lore.kernel.org/r/20230807102533.1147559-1-maze@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-16 18:12:59 +02:00
Yue Haibing
8382e7ed2d ip6mr: Fix skb_under_panic in ip6mr_cache_report()
[ Upstream commit 30e0191b16e8a58e4620fa3e2839ddc7b9d4281c ]

skbuff: skb_under_panic: text:ffffffff88771f69 len:56 put:-4
 head:ffff88805f86a800 data:ffff887f5f86a850 tail:0x88 end:0x2c0 dev:pim6reg
 ------------[ cut here ]------------
 kernel BUG at net/core/skbuff.c:192!
 invalid opcode: 0000 [#1] PREEMPT SMP KASAN
 CPU: 2 PID: 22968 Comm: kworker/2:11 Not tainted 6.5.0-rc3-00044-g0a8db05b571a #236
 Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS 1.15.0-1 04/01/2014
 Workqueue: ipv6_addrconf addrconf_dad_work
 RIP: 0010:skb_panic+0x152/0x1d0
 Call Trace:
  <TASK>
  skb_push+0xc4/0xe0
  ip6mr_cache_report+0xd69/0x19b0
  reg_vif_xmit+0x406/0x690
  dev_hard_start_xmit+0x17e/0x6e0
  __dev_queue_xmit+0x2d6a/0x3d20
  vlan_dev_hard_start_xmit+0x3ab/0x5c0
  dev_hard_start_xmit+0x17e/0x6e0
  __dev_queue_xmit+0x2d6a/0x3d20
  neigh_connected_output+0x3ed/0x570
  ip6_finish_output2+0x5b5/0x1950
  ip6_finish_output+0x693/0x11c0
  ip6_output+0x24b/0x880
  NF_HOOK.constprop.0+0xfd/0x530
  ndisc_send_skb+0x9db/0x1400
  ndisc_send_rs+0x12a/0x6c0
  addrconf_dad_completed+0x3c9/0xea0
  addrconf_dad_work+0x849/0x1420
  process_one_work+0xa22/0x16e0
  worker_thread+0x679/0x10c0
  ret_from_fork+0x28/0x60
  ret_from_fork_asm+0x11/0x20

When setup a vlan device on dev pim6reg, DAD ns packet may sent on reg_vif_xmit().
reg_vif_xmit()
    ip6mr_cache_report()
        skb_push(skb, -skb_network_offset(pkt));//skb_network_offset(pkt) is 4
And skb_push declared as:
	void *skb_push(struct sk_buff *skb, unsigned int len);
		skb->data -= len;
		//0xffff88805f86a84c - 0xfffffffc = 0xffff887f5f86a850
skb->data is set to 0xffff887f5f86a850, which is invalid mem addr, lead to skb_push() fails.

Fixes: 14fb64e1f4 ("[IPV6] MROUTE: Support PIM-SM (SSM).")
Signed-off-by: Yue Haibing <yuehaibing@huawei.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-08-11 11:45:37 +02:00
Maciej Żenczykowski
928608ccdb ipv6 addrconf: fix bug where deleting a mngtmpaddr can create a new temporary address
[ Upstream commit 69172f0bcb6a09110c5d2a6d792627f5095a9018 ]

currently on 6.4 net/main:

  # ip link add dummy1 type dummy
  # echo 1 > /proc/sys/net/ipv6/conf/dummy1/use_tempaddr
  # ip link set dummy1 up
  # ip -6 addr add 2000::1/64 mngtmpaddr dev dummy1
  # ip -6 addr show dev dummy1

  11: dummy1: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
      inet6 2000::44f3:581c:8ca:3983/64 scope global temporary dynamic
         valid_lft 604800sec preferred_lft 86172sec
      inet6 2000::1/64 scope global mngtmpaddr
         valid_lft forever preferred_lft forever
      inet6 fe80::e8a8:a6ff:fed5:56d4/64 scope link
         valid_lft forever preferred_lft forever

  # ip -6 addr del 2000::44f3:581c:8ca:3983/64 dev dummy1

  (can wait a few seconds if you want to, the above delete isn't [directly] the problem)

  # ip -6 addr show dev dummy1

  11: dummy1: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
      inet6 2000::1/64 scope global mngtmpaddr
         valid_lft forever preferred_lft forever
      inet6 fe80::e8a8:a6ff:fed5:56d4/64 scope link
         valid_lft forever preferred_lft forever

  # ip -6 addr del 2000::1/64 mngtmpaddr dev dummy1
  # ip -6 addr show dev dummy1

  11: dummy1: <BROADCAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc noqueue state UNKNOWN group default qlen 1000
      inet6 2000::81c9:56b7:f51a:b98f/64 scope global temporary dynamic
         valid_lft 604797sec preferred_lft 86169sec
      inet6 fe80::e8a8:a6ff:fed5:56d4/64 scope link
         valid_lft forever preferred_lft forever

This patch prevents this new 'global temporary dynamic' address from being
created by the deletion of the related (same subnet prefix) 'mngtmpaddr'
(which is triggered by there already being no temporary addresses).

Cc: Jiri Pirko <jiri@resnulli.us>
Fixes: 53bd674915 ("ipv6 addrconf: introduce IFA_F_MANAGETEMPADDR to tell kernel to manage temporary addresses")
Reported-by: Xiao Ma <xiaom@google.com>
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://lore.kernel.org/r/20230720160022.1887942-1-maze@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-08-11 11:45:30 +02:00
Yuanjun Gong
ee0fd07968 net:ipv6: check return value of pskb_trim()
[ Upstream commit 4258faa130be4ea43e5e2d839467da421b8ff274 ]

goto tx_err if an unexpected result is returned by pskb_tirm()
in ip6erspan_tunnel_xmit().

Fixes: 5a963eb61b ("ip6_gre: Add ERSPAN native tunnel support")
Signed-off-by: Yuanjun Gong <ruc_gongyuanjun@163.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-08-11 11:45:26 +02:00
Ziyang Xuan
df62fdcd00 ipv6/addrconf: fix a potential refcount underflow for idev
[ Upstream commit 06a0716949c22e2aefb648526580671197151acc ]

Now in addrconf_mod_rs_timer(), reference idev depends on whether
rs_timer is not pending. Then modify rs_timer timeout.

There is a time gap in [1], during which if the pending rs_timer
becomes not pending. It will miss to hold idev, but the rs_timer
is activated. Thus rs_timer callback function addrconf_rs_timer()
will be executed and put idev later without holding idev. A refcount
underflow issue for idev can be caused by this.

	if (!timer_pending(&idev->rs_timer))
		in6_dev_hold(idev);
		  <--------------[1]
	mod_timer(&idev->rs_timer, jiffies + when);

To fix the issue, hold idev if mod_timer() return 0.

Fixes: b7b1bfce0b ("ipv6: split duplicate address detection and router solicitation timer")
Suggested-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Ziyang Xuan <william.xuanziyang@huawei.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-08-11 11:45:19 +02:00
Eric Dumazet
22618980d6 udp6: fix udp6_ehashfn() typo
[ Upstream commit 51d03e2f2203e76ed02d33fb5ffbb5fc85ffaf54 ]

Amit Klein reported that udp6_ehash_secret was initialized but never used.

Fixes: 1bbdceef1e ("inet: convert inet_ehash_secret and ipv6_hash_secret to net_get_random_once")
Reported-by: Amit Klein <aksecurity@gmail.com>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Willy Tarreau <w@1wt.eu>
Cc: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Cc: David Ahern <dsahern@kernel.org>
Cc: Hannes Frederic Sowa <hannes@stressinduktion.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-08-11 11:45:18 +02:00
Kuniyuki Iwashima
8803c59fde icmp6: Fix null-ptr-deref of ip6_null_entry->rt6i_idev in icmp6_dev().
[ Upstream commit 2aaa8a15de73874847d62eb595c6683bface80fd ]

With some IPv6 Ext Hdr (RPL, SRv6, etc.), we can send a packet that
has the link-local address as src and dst IP and will be forwarded to
an external IP in the IPv6 Ext Hdr.

For example, the script below generates a packet whose src IP is the
link-local address and dst is updated to 11::.

  # for f in $(find /proc/sys/net/ -name *seg6_enabled*); do echo 1 > $f; done
  # python3
  >>> from socket import *
  >>> from scapy.all import *
  >>>
  >>> SRC_ADDR = DST_ADDR = "fe80::5054:ff:fe12:3456"
  >>>
  >>> pkt = IPv6(src=SRC_ADDR, dst=DST_ADDR)
  >>> pkt /= IPv6ExtHdrSegmentRouting(type=4, addresses=["11::", "22::"], segleft=1)
  >>>
  >>> sk = socket(AF_INET6, SOCK_RAW, IPPROTO_RAW)
  >>> sk.sendto(bytes(pkt), (DST_ADDR, 0))

For such a packet, we call ip6_route_input() to look up a route for the
next destination in these three functions depending on the header type.

  * ipv6_rthdr_rcv()
  * ipv6_rpl_srh_rcv()
  * ipv6_srh_rcv()

If no route is found, ip6_null_entry is set to skb, and the following
dst_input(skb) calls ip6_pkt_drop().

Finally, in icmp6_dev(), we dereference skb_rt6_info(skb)->rt6i_idev->dev
as the input device is the loopback interface.  Then, we have to check if
skb_rt6_info(skb)->rt6i_idev is NULL or not to avoid NULL pointer deref
for ip6_null_entry.

BUG: kernel NULL pointer dereference, address: 0000000000000000
 PF: supervisor read access in kernel mode
 PF: error_code(0x0000) - not-present page
PGD 0 P4D 0
Oops: 0000 [#1] PREEMPT SMP PTI
CPU: 0 PID: 157 Comm: python3 Not tainted 6.4.0-11996-gb121d614371c #35
Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.16.0-0-gd239552ce722-prebuilt.qemu.org 04/01/2014
RIP: 0010:icmp6_send (net/ipv6/icmp.c:436 net/ipv6/icmp.c:503)
Code: fe ff ff 48 c7 40 30 c0 86 5d 83 e8 c6 44 1c 00 e9 c8 fc ff ff 49 8b 46 58 48 83 e0 fe 0f 84 4a fb ff ff 48 8b 80 d0 00 00 00 <48> 8b 00 44 8b 88 e0 00 00 00 e9 34 fb ff ff 4d 85 ed 0f 85 69 01
RSP: 0018:ffffc90000003c70 EFLAGS: 00000286
RAX: 0000000000000000 RBX: 0000000000000001 RCX: 00000000000000e0
RDX: 0000000000000021 RSI: 0000000000000000 RDI: ffff888006d72a18
RBP: ffffc90000003d80 R08: 0000000000000000 R09: 0000000000000001
R10: ffffc90000003d98 R11: 0000000000000040 R12: ffff888006d72a10
R13: 0000000000000000 R14: ffff8880057fb800 R15: ffffffff835d86c0
FS:  00007f9dc72ee740(0000) GS:ffff88807dc00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 00000000057b2000 CR4: 00000000007506f0
PKRU: 55555554
Call Trace:
 <IRQ>
 ip6_pkt_drop (net/ipv6/route.c:4513)
 ipv6_rthdr_rcv (net/ipv6/exthdrs.c:640 net/ipv6/exthdrs.c:686)
 ip6_protocol_deliver_rcu (net/ipv6/ip6_input.c:437 (discriminator 5))
 ip6_input_finish (./include/linux/rcupdate.h:781 net/ipv6/ip6_input.c:483)
 __netif_receive_skb_one_core (net/core/dev.c:5455)
 process_backlog (./include/linux/rcupdate.h:781 net/core/dev.c:5895)
 __napi_poll (net/core/dev.c:6460)
 net_rx_action (net/core/dev.c:6529 net/core/dev.c:6660)
 __do_softirq (./arch/x86/include/asm/jump_label.h:27 ./include/linux/jump_label.h:207 ./include/trace/events/irq.h:142 kernel/softirq.c:554)
 do_softirq (kernel/softirq.c:454 kernel/softirq.c:441)
 </IRQ>
 <TASK>
 __local_bh_enable_ip (kernel/softirq.c:381)
 __dev_queue_xmit (net/core/dev.c:4231)
 ip6_finish_output2 (./include/net/neighbour.h:544 net/ipv6/ip6_output.c:135)
 rawv6_sendmsg (./include/net/dst.h:458 ./include/linux/netfilter.h:303 net/ipv6/raw.c:656 net/ipv6/raw.c:914)
 sock_sendmsg (net/socket.c:725 net/socket.c:748)
 __sys_sendto (net/socket.c:2134)
 __x64_sys_sendto (net/socket.c:2146 net/socket.c:2142 net/socket.c:2142)
 do_syscall_64 (arch/x86/entry/common.c:50 arch/x86/entry/common.c:80)
 entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:120)
RIP: 0033:0x7f9dc751baea
Code: d8 64 89 02 48 c7 c0 ff ff ff ff eb b8 0f 1f 00 f3 0f 1e fa 41 89 ca 64 8b 04 25 18 00 00 00 85 c0 75 15 b8 2c 00 00 00 0f 05 <48> 3d 00 f0 ff ff 77 7e c3 0f 1f 44 00 00 41 54 48 83 ec 30 44 89
RSP: 002b:00007ffe98712c38 EFLAGS: 00000246 ORIG_RAX: 000000000000002c
RAX: ffffffffffffffda RBX: 00007ffe98712cf8 RCX: 00007f9dc751baea
RDX: 0000000000000060 RSI: 00007f9dc6460b90 RDI: 0000000000000003
RBP: 00007f9dc56e8be0 R08: 00007ffe98712d70 R09: 000000000000001c
R10: 0000000000000000 R11: 0000000000000246 R12: 0000000000000000
R13: ffffffffc4653600 R14: 0000000000000001 R15: 00007f9dc6af5d1b
 </TASK>
Modules linked in:
CR2: 0000000000000000
 ---[ end trace 0000000000000000 ]---
RIP: 0010:icmp6_send (net/ipv6/icmp.c:436 net/ipv6/icmp.c:503)
Code: fe ff ff 48 c7 40 30 c0 86 5d 83 e8 c6 44 1c 00 e9 c8 fc ff ff 49 8b 46 58 48 83 e0 fe 0f 84 4a fb ff ff 48 8b 80 d0 00 00 00 <48> 8b 00 44 8b 88 e0 00 00 00 e9 34 fb ff ff 4d 85 ed 0f 85 69 01
RSP: 0018:ffffc90000003c70 EFLAGS: 00000286
RAX: 0000000000000000 RBX: 0000000000000001 RCX: 00000000000000e0
RDX: 0000000000000021 RSI: 0000000000000000 RDI: ffff888006d72a18
RBP: ffffc90000003d80 R08: 0000000000000000 R09: 0000000000000001
R10: ffffc90000003d98 R11: 0000000000000040 R12: ffff888006d72a10
R13: 0000000000000000 R14: ffff8880057fb800 R15: ffffffff835d86c0
FS:  00007f9dc72ee740(0000) GS:ffff88807dc00000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000000 CR3: 00000000057b2000 CR4: 00000000007506f0
PKRU: 55555554
Kernel panic - not syncing: Fatal exception in interrupt
Kernel Offset: disabled

Fixes: 4832c30d54 ("net: ipv6: put host and anycast routes on device with address")
Reported-by: Wang Yufen <wangyufen@huawei.com>
Closes: https://lore.kernel.org/netdev/c41403a9-c2f6-3b7e-0c96-e1901e605cd0@huawei.com/
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-08-11 11:45:18 +02:00
Stephen Suryaputra
a24963500a vrf: Increment Icmp6InMsgs on the original netdev
[ Upstream commit e1ae5c2ea4783b1fd87be250f9fcc9d9e1a6ba3f ]

Get the ingress interface and increment ICMP counters based on that
instead of skb->dev when the the dev is a VRF device.

This is a follow up on the following message:
https://www.spinics.net/lists/netdev/msg560268.html

v2: Avoid changing skb->dev since it has unintended effect for local
    delivery (David Ahern).
Signed-off-by: Stephen Suryaputra <ssuryaextr@gmail.com>
Reviewed-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stable-dep-of: 2aaa8a15de73 ("icmp6: Fix null-ptr-deref of ip6_null_entry->rt6i_idev in icmp6_dev().")
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-08-11 11:45:18 +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
f13140b2a7 This is the 4.19.288 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmSb7KoACgkQONu9yGCS
 aT6s8A//U4Q/1LMrkXiew99gV76v0LlFNuXEVWkd0VqEdeK+UG86gLcfjZUaHmtX
 Jx0nAZ7GWvn90ZaCNgN6PrKQ8LSeABOCGcpdx8cvLxoSGoB0ipjVcwddocAjOIzp
 ly/+1HhC0UadE9NZ7vyaCiUZ3U+0Sj22J85JZz+A4y1FwpYbXHJclGmmmmUg4MCU
 NwBUiu+2ad8D7vR7a0yiTlsdxBAwU2LoEdysteBv8vDHB+BXjNXC0jpBhXsvaaBd
 VN0bav9XWvKHN73CMcWW8I8ABSirJRQhdGC43BMNjE2+I3KIHjOzgqALOvfd9eSJ
 Jl9ztoqO+tI4wee0ZIQbobJ57vgqik+oX4eTGxaAfxD1BgqtuNVaDDw+3Wg3pgpP
 mRdbbfUixFR4tP0VsuLN3b6Ff5q4nhq8h6ZJ0I4tiSRL6K9CNimBKhTh1ECexDPr
 t+se4Zr58KkgrZCM/ERrwn5NvRcjF5PuBA1i3u1DWecHptZ6FNAwHSKMPFM7CoCH
 FTyNikDe6FCtzA2gHkj85bC5W0QahU+SD65OIv7Ziz6SOLKu2HjLYxQbcW/1uCW0
 Nikd5nADhOpDAxLvb7Cjt7Gh1GxWOIVnZaAFXh+KCVT9p/Xt8JimXvRTdSN5PGkp
 Mhg525BLTdXHQPr32IHY3gbeRbiAMCBK/pygPQ2DBKRVS53jkyM=
 =RsRd
 -----END PGP SIGNATURE-----

Merge 4.19.288 into android-4.19-stable

Changes in 4.19.288
	serial: lantiq: Change ltq_w32_mask to asc_update_bits
	serial: lantiq: Use readl/writel instead of ltq_r32/ltq_w32
	serial: lantiq: Do not swap register read/writes
	serial: lantiq: add missing interrupt ack
	nilfs2: reject devices with insufficient block count
	x86/purgatory: remove PGO flags
	ipmi: Make the smi watcher be disabled immediately when not needed
	ipmi: move message error checking to avoid deadlock
	nilfs2: fix buffer corruption due to concurrent device reads
	Drivers: hv: vmbus: Fix vmbus_wait_for_unload() to scan present CPUs
	PCI: hv: Fix a race condition bug in hv_pci_query_relations()
	cgroup: Do not corrupt task iteration when rebinding subsystem
	nilfs2: prevent general protection fault in nilfs_clear_dirty_page()
	rcu: Upgrade rcu_swap_protected() to rcu_replace_pointer()
	ieee802154: hwsim: Fix possible memory leaks
	xfrm: Linearize the skb after offloading if needed.
	net: qca_spi: Avoid high load if QCA7000 is not available
	mmc: mtk-sd: fix deferred probing
	mmc: mvsdio: convert to devm_platform_ioremap_resource
	mmc: mvsdio: fix deferred probing
	mmc: omap: fix deferred probing
	mmc: omap_hsmmc: fix deferred probing
	mmc: sdhci-acpi: fix deferred probing
	mmc: usdhi60rol0: fix deferred probing
	be2net: Extend xmit workaround to BE3 chip
	netfilter: nf_tables: disallow element updates of bound anonymous sets
	netfilter: nfnetlink_osf: fix module autoload
	sch_netem: acquire qdisc lock in netem_change()
	scsi: target: iscsi: Prevent login threads from racing between each other
	HID: wacom: Add error check to wacom_parse_and_register()
	arm64: Add missing Set/Way CMO encodings
	media: cec: core: don't set last_initiator if tx in progress
	nfcsim.c: Fix error checking for debugfs_create_dir
	usb: gadget: udc: fix NULL dereference in remove()
	s390/cio: unregister device when the only path is gone
	ASoC: nau8824: Add quirk to active-high jack-detect
	drm/exynos: vidi: fix a wrong error return
	drm/exynos: fix race condition UAF in exynos_g2d_exec_ioctl
	drm/radeon: fix race condition UAF in radeon_gem_set_domain_ioctl
	x86/apic: Fix kernel panic when booting with intremap=off and x2apic_phys
	i2c: imx-lpi2c: fix type char overflow issue when calculating the clock cycle
	Linux 4.19.288

Change-Id: I0ec8e3df85fb79855d508ea71b305c91eba49210
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-06-28 09:46:36 +00:00
Sebastian Andrzej Siewior
18d4b9b2e6 xfrm: Linearize the skb after offloading if needed.
[ Upstream commit f015b900bc3285322029b4a7d132d6aeb0e51857 ]

With offloading enabled, esp_xmit() gets invoked very late, from within
validate_xmit_xfrm() which is after validate_xmit_skb() validates and
linearizes the skb if the underlying device does not support fragments.

esp_output_tail() may add a fragment to the skb while adding the auth
tag/ IV. Devices without the proper support will then send skb->data
points to with the correct length so the packet will have garbage at the
end. A pcap sniffer will claim that the proper data has been sent since
it parses the skb properly.

It is not affected with INET_ESP_OFFLOAD disabled.

Linearize the skb after offloading if the sending hardware requires it.
It was tested on v4, v6 has been adopted.

Fixes: 7785bba299 ("esp: Add a software GRO codepath")
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-06-28 10:15:29 +02:00
Greg Kroah-Hartman
0e19062e22 This is the 4.19.287 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmSS/c0ACgkQONu9yGCS
 aT660BAA1cbdy5pn+U5yYzVs4PktXel3eGZlobJH1/KKkNp4STZhALrnWbpMjMvr
 lYe4HSR7qsPf03+gXiO2q2uo33NiZmtpnwiTYQKuMT5dHGYK+SY+geJhWu5AFTtL
 OYWrJt5M/ZDtx5vnC5RrQ+hKUI3up7n9ZzXvAOb41V1D1aA4GYk9eeC5c7ghx80T
 gOZH+97nc2AhOXKazksV9EFfScBsl11NcGbV4HUjmI1T3Rif/bo6QXzgA3nYMRtr
 miFJax/STYZ9cnvrGH3K6mNth1Of5rLmgoO8HEgd1Xsdz1N/m3SHZdXaln+YAG1n
 c60Q2I/HaNj9a+R+XhXTLWtdDE7ZF3oZGvgX9XucTdv0d8srv4DDetD9/AHcvqxw
 CobKbxM9tFxoPnykpM7hix6tsQv19c/wthYo8yPR0jwcYnWgGX60nDofO2gnCC7M
 ZdkGwjDH5+Hhl8trI16Csf57IUwmswTe+zfNyfi2cr1zxx+0uChP8JPXXUZ0sDi+
 1pnPrUaJXMhFxoCeIQYRAnEBBChDo9PkPJtJbqJijjdufrJDAJvL0KSA0Ue9DB9q
 L/A0idYIvfT9d/WJhoLRGLVPhf8nzivBUjtsdHuE3Yu8Pdm476sxNil2NfHWPDRI
 SclcA7+nG1ZXD3W5Fd5Le7msLCztOevpQfzaRtvywtM8j4hsr8o=
 =94Sv
 -----END PGP SIGNATURE-----

Merge 4.19.287 into android-4.19-stable

Changes in 4.19.287
	power: supply: ab8500: Fix external_power_changed race
	power: supply: bq27xxx: Use mod_delayed_work() instead of cancel() + schedule()
	ARM: dts: vexpress: add missing cache properties
	power: supply: Ratelimit no data debug output
	regulator: Fix error checking for debugfs_create_dir
	irqchip/meson-gpio: Mark OF related data as maybe unused
	power: supply: Fix logic checking if system is running from battery
	parisc: Improve cache flushing for PCXL in arch_sync_dma_for_cpu()
	MIPS: Alchemy: fix dbdma2
	mips: Move initrd_start check after initrd address sanitisation.
	xen/blkfront: Only check REQ_FUA for writes
	ocfs2: fix use-after-free when unmounting read-only filesystem
	ocfs2: check new file size on fallocate call
	nios2: dts: Fix tse_mac "max-frame-size" property
	nilfs2: fix incomplete buffer cleanup in nilfs_btnode_abort_change_key()
	nilfs2: fix possible out-of-bounds segment allocation in resize ioctl
	kexec: support purgatories with .text.hot sections
	powerpc/purgatory: remove PGO flags
	nouveau: fix client work fence deletion race
	RDMA/uverbs: Restrict usage of privileged QKEYs
	net: usb: qmi_wwan: add support for Compal RXM-G1
	Remove DECnet support from kernel
	USB: serial: option: add Quectel EM061KGL series
	usb: dwc3: gadget: Reset num TRBs before giving back the request
	usb: gadget: f_ncm: Add OS descriptor support
	usb: gadget: f_ncm: Fix NTP-32 support
	netfilter: nfnetlink: skip error delivery on batch in case of ENOMEM
	ping6: Fix send to link-local addresses with VRF.
	RDMA/rxe: Remove the unused variable obj
	RDMA/rxe: Removed unused name from rxe_task struct
	RDMA/rxe: Fix the use-before-initialization error of resp_pkts
	IB/uverbs: Fix to consider event queue closing also upon non-blocking mode
	IB/isert: Fix dead lock in ib_isert
	IB/isert: Fix possible list corruption in CMA handler
	IB/isert: Fix incorrect release of isert connection
	sctp: fix an error code in sctp_sf_eat_auth()
	igb: fix nvm.ops.read() error handling
	drm/nouveau/dp: check for NULL nv_connector->native_mode
	drm/nouveau/kms: Don't change EDID when it hasn't actually changed
	drm/nouveau: add nv_encoder pointer check for NULL
	net: lapbether: only support ethernet devices
	net: tipc: resize nlattr array to correct size
	selftests/ptp: Fix timestamp printf format for PTP_SYS_OFFSET
	neighbour: Remove unused inline function neigh_key_eq16()
	net: Remove unused inline function dst_hold_and_use()
	neighbour: delete neigh_lookup_nodev as not used
	drm/nouveau/kms: Fix NULL pointer dereference in nouveau_connector_detect_depth
	powerpc: Fix defconfig choice logic when cross compiling
	mmc: block: ensure error propagation for non-blk
	Linux 4.19.287

Change-Id: Ib4119b05e8fe06820cd2d6f3aa66a7e7e8cc5100
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-06-21 16:30:35 +00:00
Guillaume Nault
17c46e7f29 ping6: Fix send to link-local addresses with VRF.
[ Upstream commit 91ffd1bae1dafbb9e34b46813f5b058581d9144d ]

Ping sockets can't send packets when they're bound to a VRF master
device and the output interface is set to a slave device.

For example, when net.ipv4.ping_group_range is properly set, so that
ping6 can use ping sockets, the following kind of commands fails:
  $ ip vrf exec red ping6 fe80::854:e7ff:fe88:4bf1%eth1

What happens is that sk->sk_bound_dev_if is set to the VRF master
device, but 'oif' is set to the real output device. Since both are set
but different, ping_v6_sendmsg() sees their value as inconsistent and
fails.

Fix this by allowing 'oif' to be a slave device of ->sk_bound_dev_if.

This fixes the following kselftest failure:
  $ ./fcnal-test.sh -t ipv6_ping
  [...]
  TEST: ping out, vrf device+address bind - ns-B IPv6 LLA        [FAIL]

Reported-by: Mirsad Todorovac <mirsad.todorovac@alu.unizg.hr>
Closes: https://lore.kernel.org/netdev/b6191f90-ffca-dbca-7d06-88a9788def9c@alu.unizg.hr/
Tested-by: Mirsad Todorovac <mirsad.todorovac@alu.unizg.hr>
Fixes: 5e45789698 ("net: ipv6: Fix ping to link-local addresses.")
Signed-off-by: Guillaume Nault <gnault@redhat.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://lore.kernel.org/r/6c8b53108816a8d0d5705ae37bdc5a8322b5e3d9.1686153846.git.gnault@redhat.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-06-21 15:39:58 +02: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
Nicolas Dichtel
15c11db30e ipv{4,6}/raw: fix output xfrm lookup wrt protocol
commit 3632679d9e4f879f49949bb5b050e0de553e4739 upstream.

With a raw socket bound to IPPROTO_RAW (ie with hdrincl enabled), the
protocol field of the flow structure, build by raw_sendmsg() /
rawv6_sendmsg()),  is set to IPPROTO_RAW. This breaks the ipsec policy
lookup when some policies are defined with a protocol in the selector.

For ipv6, the sin6_port field from 'struct sockaddr_in6' could be used to
specify the protocol. Just accept all values for IPPROTO_RAW socket.

For ipv4, the sin_port field of 'struct sockaddr_in' could not be used
without breaking backward compatibility (the value of this field was never
checked). Let's add a new kind of control message, so that the userland
could specify which protocol is used.

Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
CC: stable@vger.kernel.org
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Link: https://lore.kernel.org/r/20230522120820.1319391-1-nicolas.dichtel@6wind.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-06-09 10:23:54 +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
Gavrilov Ilia
04bf69e3de ipv6: Fix out-of-bounds access in ipv6_find_tlv()
commit 878ecb0897f4737a4c9401f3523fd49589025671 upstream.

optlen is fetched without checking whether there is more than one byte to parse.
It can lead to out-of-bounds access.

Found by InfoTeCS on behalf of Linux Verification Center
(linuxtesting.org) with SVACE.

Fixes: c61a404325 ("[IPV6]: Find option offset by type.")
Signed-off-by: Gavrilov Ilia <Ilia.Gavrilov@infotecs.ru>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-30 12:42:14 +01:00
Kuniyuki Iwashima
cc56de054d udplite: Fix NULL pointer dereference in __sk_mem_raise_allocated().
commit ad42a35bdfc6d3c0fc4cb4027d7b2757ce665665 upstream.

syzbot reported [0] a null-ptr-deref in sk_get_rmem0() while using
IPPROTO_UDPLITE (0x88):

  14:25:52 executing program 1:
  r0 = socket$inet6(0xa, 0x80002, 0x88)

We had a similar report [1] for probably sk_memory_allocated_add()
in __sk_mem_raise_allocated(), and commit c915fe13cb ("udplite: fix
NULL pointer dereference") fixed it by setting .memory_allocated for
udplite_prot and udplitev6_prot.

To fix the variant, we need to set either .sysctl_wmem_offset or
.sysctl_rmem.

Now UDP and UDPLITE share the same value for .memory_allocated, so we
use the same .sysctl_wmem_offset for UDP and UDPLITE.

[0]:
general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] PREEMPT SMP KASAN
KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007]
CPU: 0 PID: 6829 Comm: syz-executor.1 Not tainted 6.4.0-rc2-syzkaller #0
Hardware name: Google Google Compute Engine/Google Compute Engine, BIOS Google 04/28/2023
RIP: 0010:sk_get_rmem0 include/net/sock.h:2907 [inline]
RIP: 0010:__sk_mem_raise_allocated+0x806/0x17a0 net/core/sock.c:3006
Code: c1 ea 03 80 3c 02 00 0f 85 23 0f 00 00 48 8b 44 24 08 48 8b 98 38 01 00 00 48 b8 00 00 00 00 00 fc ff df 48 89 da 48 c1 ea 03 <0f> b6 14 02 48 89 d8 83 e0 07 83 c0 03 38 d0 0f 8d 6f 0a 00 00 8b
RSP: 0018:ffffc90005d7f450 EFLAGS: 00010246
RAX: dffffc0000000000 RBX: 0000000000000000 RCX: ffffc90004d92000
RDX: 0000000000000000 RSI: ffffffff88066482 RDI: ffffffff8e2ccbb8
RBP: ffff8880173f7000 R08: 0000000000000005 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000000 R12: 0000000000030000
R13: 0000000000000001 R14: 0000000000000340 R15: 0000000000000001
FS:  0000000000000000(0000) GS:ffff8880b9800000(0063) knlGS:00000000f7f1cb40
CS:  0010 DS: 002b ES: 002b CR0: 0000000080050033
CR2: 000000002e82f000 CR3: 0000000034ff0000 CR4: 00000000003506f0
Call Trace:
 <TASK>
 __sk_mem_schedule+0x6c/0xe0 net/core/sock.c:3077
 udp_rmem_schedule net/ipv4/udp.c:1539 [inline]
 __udp_enqueue_schedule_skb+0x776/0xb30 net/ipv4/udp.c:1581
 __udpv6_queue_rcv_skb net/ipv6/udp.c:666 [inline]
 udpv6_queue_rcv_one_skb+0xc39/0x16c0 net/ipv6/udp.c:775
 udpv6_queue_rcv_skb+0x194/0xa10 net/ipv6/udp.c:793
 __udp6_lib_mcast_deliver net/ipv6/udp.c:906 [inline]
 __udp6_lib_rcv+0x1bda/0x2bd0 net/ipv6/udp.c:1013
 ip6_protocol_deliver_rcu+0x2e7/0x1250 net/ipv6/ip6_input.c:437
 ip6_input_finish+0x150/0x2f0 net/ipv6/ip6_input.c:482
 NF_HOOK include/linux/netfilter.h:303 [inline]
 NF_HOOK include/linux/netfilter.h:297 [inline]
 ip6_input+0xa0/0xd0 net/ipv6/ip6_input.c:491
 ip6_mc_input+0x40b/0xf50 net/ipv6/ip6_input.c:585
 dst_input include/net/dst.h:468 [inline]
 ip6_rcv_finish net/ipv6/ip6_input.c:79 [inline]
 NF_HOOK include/linux/netfilter.h:303 [inline]
 NF_HOOK include/linux/netfilter.h:297 [inline]
 ipv6_rcv+0x250/0x380 net/ipv6/ip6_input.c:309
 __netif_receive_skb_one_core+0x114/0x180 net/core/dev.c:5491
 __netif_receive_skb+0x1f/0x1c0 net/core/dev.c:5605
 netif_receive_skb_internal net/core/dev.c:5691 [inline]
 netif_receive_skb+0x133/0x7a0 net/core/dev.c:5750
 tun_rx_batched+0x4b3/0x7a0 drivers/net/tun.c:1553
 tun_get_user+0x2452/0x39c0 drivers/net/tun.c:1989
 tun_chr_write_iter+0xdf/0x200 drivers/net/tun.c:2035
 call_write_iter include/linux/fs.h:1868 [inline]
 new_sync_write fs/read_write.c:491 [inline]
 vfs_write+0x945/0xd50 fs/read_write.c:584
 ksys_write+0x12b/0x250 fs/read_write.c:637
 do_syscall_32_irqs_on arch/x86/entry/common.c:112 [inline]
 __do_fast_syscall_32+0x65/0xf0 arch/x86/entry/common.c:178
 do_fast_syscall_32+0x33/0x70 arch/x86/entry/common.c:203
 entry_SYSENTER_compat_after_hwframe+0x70/0x82
RIP: 0023:0xf7f21579
Code: b8 01 10 06 03 74 b4 01 10 07 03 74 b0 01 10 08 03 74 d8 01 00 00 00 00 00 00 00 00 00 00 00 00 00 51 52 55 89 e5 0f 34 cd 80 <5d> 5a 59 c3 90 90 90 90 8d b4 26 00 00 00 00 8d b4 26 00 00 00 00
RSP: 002b:00000000f7f1c590 EFLAGS: 00000282 ORIG_RAX: 0000000000000004
RAX: ffffffffffffffda RBX: 00000000000000c8 RCX: 0000000020000040
RDX: 0000000000000083 RSI: 00000000f734e000 RDI: 0000000000000000
RBP: 0000000000000000 R08: 0000000000000000 R09: 0000000000000000
R10: 0000000000000000 R11: 0000000000000296 R12: 0000000000000000
R13: 0000000000000000 R14: 0000000000000000 R15: 0000000000000000
 </TASK>
Modules linked in:

Link: https://lore.kernel.org/netdev/CANaxB-yCk8hhP68L4Q2nFOJht8sqgXGGQO2AftpHs0u1xyGG5A@mail.gmail.com/ [1]
Fixes: 850cbaddb5 ("udp: use it's own memory accounting schema")
Reported-by: syzbot+444ca0907e96f7c5e48b@syzkaller.appspotmail.com
Closes: https://syzkaller.appspot.com/bug?extid=444ca0907e96f7c5e48b
Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Link: https://lore.kernel.org/r/20230523163305.66466-1-kuniyu@amazon.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-05-30 12:42:14 +01:00
Pablo Neira Ayuso
e570ac195d netfilter: nftables: add nft_parse_register_load() and use it
[ 4f16d25c68ec844299a4df6ecbb0234eaf88a935 ]

This new function combines the netlink register attribute parser
and the load validation function.

This update requires to replace:

	enum nft_registers      sreg:8;

in many of the expression private areas otherwise compiler complains
with:

	error: cannot take address of bit-field ‘sreg’

when passing the register field as reference.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-30 12:42:12 +01:00
Xin Long
4e81960e93 erspan: get the proto with the md version for collect_md
[ Upstream commit d80fc101d2eb9b3188c228d61223890aeea480a4 ]

In commit 20704bd1633d ("erspan: build the header with the right proto
according to erspan_ver"), it gets the proto with t->parms.erspan_ver,
but t->parms.erspan_ver is not used by collect_md branch, and instead
it should get the proto with md->version for collect_md.

Thanks to Kevin for pointing this out.

Fixes: 20704bd1633d ("erspan: build the header with the right proto according to erspan_ver")
Fixes: 94d7d8f292 ("ip6_gre: add erspan v2 support")
Reported-by: Kevin Traynor <ktraynor@redhat.com>
Signed-off-by: Xin Long <lucien.xin@gmail.com>
Reviewed-by: Simon Horman <simon.horman@corigine.com>
Reviewed-by: William Tu <u9012063@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-30 12:42:10 +01:00
Peilin Ye
9d63285922 ip_gre, ip6_gre: Fix race condition on o_seqno in collect_md mode
[ Upstream commit 31c417c948d7f6909cb63f0ac3298f3c38f8ce20 ]

As pointed out by Jakub Kicinski, currently using TUNNEL_SEQ in
collect_md mode is racy for [IP6]GRE[TAP] devices.  Consider the
following sequence of events:

1. An [IP6]GRE[TAP] device is created in collect_md mode using "ip link
   add ... external".  "ip" ignores "[o]seq" if "external" is specified,
   so TUNNEL_SEQ is off, and the device is marked as NETIF_F_LLTX (i.e.
   it uses lockless TX);
2. Someone sets TUNNEL_SEQ on outgoing skb's, using e.g.
   bpf_skb_set_tunnel_key() in an eBPF program attached to this device;
3. gre_fb_xmit() or __gre6_xmit() processes these skb's:

	gre_build_header(skb, tun_hlen,
			 flags, protocol,
			 tunnel_id_to_key32(tun_info->key.tun_id),
			 (flags & TUNNEL_SEQ) ? htonl(tunnel->o_seqno++)
					      : 0);   ^^^^^^^^^^^^^^^^^

Since we are not using the TX lock (&txq->_xmit_lock), multiple CPUs may
try to do this tunnel->o_seqno++ in parallel, which is racy.  Fix it by
making o_seqno atomic_t.

As mentioned by Eric Dumazet in commit b790e01aee ("ip_gre: lockless
xmit"), making o_seqno atomic_t increases "chance for packets being out
of order at receiver" when NETIF_F_LLTX is on.

Maybe a better fix would be:

1. Do not ignore "oseq" in external mode.  Users MUST specify "oseq" if
   they want the kernel to allow sequencing of outgoing packets;
2. Reject all outgoing TUNNEL_SEQ packets if the device was not created
   with "oseq".

Unfortunately, that would break userspace.

We could now make [IP6]GRE[TAP] devices always NETIF_F_LLTX, but let us
do it in separate patches to keep this fix minimal.

Suggested-by: Jakub Kicinski <kuba@kernel.org>
Fixes: 77a5196a80 ("gre: add sequence number for collect md mode.")
Signed-off-by: Peilin Ye <peilin.ye@bytedance.com>
Acked-by: William Tu <u9012063@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-30 12:42:10 +01:00
Peilin Ye
6fe9988585 ip6_gre: Make o_seqno start from 0 in native mode
[ Upstream commit fde98ae91f79cab4e020f40c35ed23cbdc59661c ]

For IP6GRE and IP6GRETAP devices, currently o_seqno starts from 1 in
native mode.  According to RFC 2890 2.2., "The first datagram is sent
with a sequence number of 0."  Fix it.

It is worth mentioning that o_seqno already starts from 0 in collect_md
mode, see the "if (tunnel->parms.collect_md)" clause in __gre6_xmit(),
where tunnel->o_seqno is passed to gre_build_header() before getting
incremented.

Fixes: c12b395a46 ("gre: Support GRE over IPv6")
Signed-off-by: Peilin Ye <peilin.ye@bytedance.com>
Acked-by: William Tu <u9012063@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-30 12:42:10 +01:00
Peilin Ye
c0df813cbe ip6_gre: Fix skb_under_panic in __gre6_xmit()
[ Upstream commit ab198e1d0dd8dc4bc7575fb50758e2cbd51e14e1 ]

Feng reported an skb_under_panic BUG triggered by running
test_ip6gretap() in tools/testing/selftests/bpf/test_tunnel.sh:

[   82.492551] skbuff: skb_under_panic: text:ffffffffb268bb8e len:403 put:12 head:ffff9997c5480000 data:ffff9997c547fff8 tail:0x18b end:0x2c0 dev:ip6gretap11
<...>
[   82.607380] Call Trace:
[   82.609389]  <TASK>
[   82.611136]  skb_push.cold.109+0x10/0x10
[   82.614289]  __gre6_xmit+0x41e/0x590
[   82.617169]  ip6gre_tunnel_xmit+0x344/0x3f0
[   82.620526]  dev_hard_start_xmit+0xf1/0x330
[   82.623882]  sch_direct_xmit+0xe4/0x250
[   82.626961]  __dev_queue_xmit+0x720/0xfe0
<...>
[   82.633431]  packet_sendmsg+0x96a/0x1cb0
[   82.636568]  sock_sendmsg+0x30/0x40
<...>

The following sequence of events caused the BUG:

1. During ip6gretap device initialization, tunnel->tun_hlen (e.g. 4) is
   calculated based on old flags (see ip6gre_calc_hlen());
2. packet_snd() reserves header room for skb A, assuming
   tunnel->tun_hlen is 4;
3. Later (in clsact Qdisc), the eBPF program sets a new tunnel key for
   skb A using bpf_skb_set_tunnel_key() (see _ip6gretap_set_tunnel());
4. __gre6_xmit() detects the new tunnel key, and recalculates
   "tun_hlen" (e.g. 12) based on new flags (e.g. TUNNEL_KEY and
   TUNNEL_SEQ);
5. gre_build_header() calls skb_push() with insufficient reserved header
   room, triggering the BUG.

As sugguested by Cong, fix it by moving the call to skb_cow_head() after
the recalculation of tun_hlen.

Reproducer:

  OBJ=$LINUX/tools/testing/selftests/bpf/test_tunnel_kern.o

  ip netns add at_ns0
  ip link add veth0 type veth peer name veth1
  ip link set veth0 netns at_ns0
  ip netns exec at_ns0 ip addr add 172.16.1.100/24 dev veth0
  ip netns exec at_ns0 ip link set dev veth0 up
  ip link set dev veth1 up mtu 1500
  ip addr add dev veth1 172.16.1.200/24

  ip netns exec at_ns0 ip addr add ::11/96 dev veth0
  ip netns exec at_ns0 ip link set dev veth0 up
  ip addr add dev veth1 ::22/96
  ip link set dev veth1 up

  ip netns exec at_ns0 \
  	ip link add dev ip6gretap00 type ip6gretap seq flowlabel 0xbcdef key 2 \
  	local ::11 remote ::22

  ip netns exec at_ns0 ip addr add dev ip6gretap00 10.1.1.100/24
  ip netns exec at_ns0 ip addr add dev ip6gretap00 fc80::100/96
  ip netns exec at_ns0 ip link set dev ip6gretap00 up

  ip link add dev ip6gretap11 type ip6gretap external
  ip addr add dev ip6gretap11 10.1.1.200/24
  ip addr add dev ip6gretap11 fc80::200/24
  ip link set dev ip6gretap11 up

  tc qdisc add dev ip6gretap11 clsact
  tc filter add dev ip6gretap11 egress bpf da obj $OBJ sec ip6gretap_set_tunnel
  tc filter add dev ip6gretap11 ingress bpf da obj $OBJ sec ip6gretap_get_tunnel

  ping6 -c 3 -w 10 -q ::11

Fixes: 6712abc168 ("ip6_gre: add ip6 gre and gretap collect_md mode")
Reported-by: Feng Zhou <zhoufeng.zf@bytedance.com>
Co-developed-by: Cong Wang <cong.wang@bytedance.com>
Signed-off-by: Cong Wang <cong.wang@bytedance.com>
Signed-off-by: Peilin Ye <peilin.ye@bytedance.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-30 12:42:10 +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
Cong Wang
6ac6a564ed sit: update dev->needed_headroom in ipip6_tunnel_bind_dev()
[ Upstream commit c88f8d5cd95fd039cff95d682b8e71100c001df0 ]

When a tunnel device is bound with the underlying device, its
dev->needed_headroom needs to be updated properly. IPv4 tunnels
already do the same in ip_tunnel_bind_dev(). Otherwise we may
not have enough header room for skb, especially after commit
b17f709a24 ("gue: TX support for using remote checksum offload option").

Fixes: 32b8a8e59c ("sit: add IPv4 over IPv4 support")
Reported-by: Palash Oswal <oswalpalash@gmail.com>
Link: https://lore.kernel.org/netdev/CAGyP=7fDcSPKu6nttbGwt7RXzE3uyYxLjCSE97J64pRxJP8jPA@mail.gmail.com/
Cc: Kuniyuki Iwashima <kuniyu@amazon.com>
Cc: Eric Dumazet <edumazet@google.com>
Signed-off-by: Cong Wang <cong.wang@bytedance.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-17 11:13:23 +02:00
Michael Bestas
96ce54f451
Merge tag 'ASB-2023-05-05_4.19-stable' of https://android.googlesource.com/kernel/common into android13-4.19-kona
https://source.android.com/docs/security/bulletin/2023-05-01
CVE-2023-21102
CVE-2023-21106
CVE-2023-0266

* tag 'ASB-2023-05-05_4.19-stable' of https://android.googlesource.com/kernel/common:
  Linux 4.19.282
  ASN.1: Fix check for strdup() success
  iio: adc: at91-sama5d2_adc: fix an error code in at91_adc_allocate_trigger()
  counter: 104-quad-8: Fix race condition between FLAG and CNTR reads
  sctp: Call inet6_destroy_sock() via sk->sk_destruct().
  dccp: Call inet6_destroy_sock() via sk->sk_destruct().
  inet6: Remove inet6_destroy_sock() in sk->sk_prot->destroy().
  tcp/udp: Call inet6_destroy_sock() in IPv6 sk->sk_destruct().
  udp: Call inet6_destroy_sock() in setsockopt(IPV6_ADDRFORM).
  ext4: fix use-after-free in ext4_xattr_set_entry
  ext4: remove duplicate definition of ext4_xattr_ibody_inline_set()
  Revert "ext4: fix use-after-free in ext4_xattr_set_entry"
  x86/purgatory: Don't generate debug info for purgatory.ro
  memstick: fix memory leak if card device is never registered
  nilfs2: initialize unused bytes in segment summary blocks
  xen/netback: use same error messages for same errors
  s390/ptrace: fix PTRACE_GET_LAST_BREAK error handling
  net: dsa: b53: mmap: add phy ops
  scsi: core: Improve scsi_vpd_inquiry() checks
  scsi: megaraid_sas: Fix fw_crash_buffer_show()
  selftests: sigaltstack: fix -Wuninitialized
  Input: i8042 - add quirk for Fujitsu Lifebook A574/H
  f2fs: Fix f2fs_truncate_partial_nodes ftrace event
  e1000e: Disable TSO on i219-LM card to increase speed
  mlxfw: fix null-ptr-deref in mlxfw_mfa2_tlv_next()
  i40e: fix i40e_setup_misc_vector() error handling
  i40e: fix accessing vsi->active_filters without holding lock
  virtio_net: bugfix overflow inside xdp_linearize_page()
  net: sched: sch_qfq: prevent slab-out-of-bounds in qfq_activate_agg
  ARM: dts: rockchip: fix a typo error for rk3288 spdif node
  Linux 4.19.281
  arm64: KVM: Fix system register enumeration
  KVM: arm64: Filter out invalid core register IDs in KVM_GET_REG_LIST
  KVM: arm64: Factor out core register ID enumeration
  KVM: nVMX: add missing consistency checks for CR0 and CR4
  coresight-etm4: Fix for() loop drvdata->nr_addr_cmp range bug
  watchdog: sbsa_wdog: Make sure the timeout programming is within the limits
  cgroup/cpuset: Wake up cpuset_attach_wq tasks in cpuset_cancel_attach()
  ubi: Fix deadlock caused by recursively holding work_sem
  mtd: ubi: wl: Fix a couple of kernel-doc issues
  ubi: Fix failure attaching when vid_hdr offset equals to (sub)page size
  x86/PCI: Add quirk for AMD XHCI controller that loses MSI-X state in D3hot
  scsi: ses: Handle enclosure with just a primary component gracefully
  verify_pefile: relax wrapper length check
  efi: sysfb_efi: Add quirk for Lenovo Yoga Book X91F/L
  i2c: imx-lpi2c: clean rx/tx buffers upon new message
  power: supply: cros_usbpd: reclassify "default case!" as debug
  udp6: fix potential access to stale information
  net: macb: fix a memory corruption in extended buffer descriptor mode
  sctp: fix a potential overflow in sctp_ifwdtsn_skip
  qlcnic: check pci_reset_function result
  niu: Fix missing unwind goto in niu_alloc_channels()
  9p/xen : Fix use after free bug in xen_9pfs_front_remove due to race condition
  mtdblock: tolerate corrected bit-flips
  Bluetooth: Fix race condition in hidp_session_thread
  Bluetooth: L2CAP: Fix use-after-free in l2cap_disconnect_{req,rsp}
  ALSA: hda/sigmatel: fix S/PDIF out on Intel D*45* motherboards
  ALSA: i2c/cs8427: fix iec958 mixer control deactivation
  ALSA: hda/sigmatel: add pin overrides for Intel DP45SG motherboard
  ALSA: emu10k1: fix capture interrupt handler unlinking
  Revert "pinctrl: amd: Disable and mask interrupts on resume"
  mm/swap: fix swap_info_struct race between swapoff and get_swap_pages()
  ring-buffer: Fix race while reader and writer are on the same page
  ftrace: Mark get_lock_parent_ip() __always_inline
  perf/core: Fix the same task check in perf_event_set_output
  ALSA: hda/realtek: Add quirk for Clevo X370SNW
  nilfs2: fix sysfs interface lifetime
  nilfs2: fix potential UAF of struct nilfs_sc_info in nilfs_segctor_thread()
  tty: serial: sh-sci: Fix Rx on RZ/G2L SCI
  tty: serial: sh-sci: Fix transmit end interrupt handler
  iio: dac: cio-dac: Fix max DAC write value check for 12-bit
  USB: serial: option: add Quectel RM500U-CN modem
  USB: serial: option: add Telit FE990 compositions
  USB: serial: cp210x: add Silicon Labs IFS-USB-DATACABLE IDs
  gpio: davinci: Add irq chip flag to skip set wake
  ipv6: Fix an uninit variable access bug in __ip6_make_skb()
  sctp: check send stream number after wait_for_sndbuf
  net: don't let netpoll invoke NAPI if in xmit context
  icmp: guard against too small mtu
  wifi: mac80211: fix invalid drv_sta_pre_rcu_remove calls for non-uploaded sta
  pwm: cros-ec: Explicitly set .polarity in .get_state()
  NFSv4: Fix hangs when recovering open state after a server reboot
  NFSv4: Check the return value of update_open_stateid()
  NFSv4: Convert struct nfs4_state to use refcount_t
  pinctrl: amd: Disable and mask interrupts on resume
  pinctrl: amd: disable and mask interrupts on probe
  pinctrl: amd: Use irqchip template
  pinctrl: Added IRQF_SHARED flag for amd-pinctrl driver
  Revert "dm thin: fix deadlock when swapping to thin device"
  Linux 4.19.280
  cgroup: Add missing cpus_read_lock() to cgroup_attach_task_all()
  cgroup: Fix threadgroup_rwsem <-> cpus_read_lock() deadlock
  cgroup/cpuset: Change cpuset_rwsem and hotplug lock order
  net: sched: cbq: dont intepret cls results when asked to drop
  gfs2: Always check inode size of inline inodes
  firmware: arm_scmi: Fix device node validation for mailbox transport
  ext4: fix kernel BUG in 'ext4_write_inline_data_end()'
  usb: host: ohci-pxa27x: Fix and & vs | typo
  s390/uaccess: add missing earlyclobber annotations to __clear_user()
  drm/etnaviv: fix reference leak when mmaping imported buffer
  ALSA: usb-audio: Fix regression on detection of Roland VS-100
  ALSA: hda/conexant: Partial revert of a quirk for Lenovo
  pinctrl: at91-pio4: fix domain name assignment
  xen/netback: don't do grant copy across page boundary
  cifs: fix DFS traversal oops without CONFIG_CIFS_DFS_UPCALL
  cifs: prevent infinite recursion in CIFSGetDFSRefer()
  Input: focaltech - use explicitly signed char type
  Input: alps - fix compatibility with -funsigned-char
  net: mvneta: make tx buffer array agnostic
  net: dsa: mv88e6xxx: Enable IGMP snooping on user ports only
  i40e: fix registers dump after run ethtool adapter self test
  can: bcm: bcm_tx_setup(): fix KMSAN uninit-value in vfs_write
  scsi: megaraid_sas: Fix crash after a double completion
  ca8210: Fix unsigned mac_len comparison with zero in ca8210_skb_tx()
  fbdev: au1200fb: Fix potential divide by zero
  fbdev: lxfb: Fix potential divide by zero
  fbdev: intelfb: Fix potential divide by zero
  fbdev: nvidia: Fix potential divide by zero
  sched_getaffinity: don't assume 'cpumask_size()' is fully initialized
  fbdev: tgafb: Fix potential divide by zero
  ALSA: hda/ca0132: fixup buffer overrun at tuning_ctl_set()
  ALSA: asihpi: check pao in control_message()
  md: avoid signed overflow in slot_store()
  bus: imx-weim: fix branch condition evaluates to a garbage value
  ocfs2: fix data corruption after failed write
  tun: avoid double free in tun_free_netdev
  sched/fair: Sanitize vruntime of entity being migrated
  sched/fair: sanitize vruntime of entity being placed
  dm crypt: add cond_resched() to dmcrypt_write()
  dm stats: check for and propagate alloc_percpu failure
  i2c: xgene-slimpro: Fix out-of-bounds bug in xgene_slimpro_i2c_xfer()
  nilfs2: fix kernel-infoleak in nilfs_ioctl_wrap_copy()
  usb: chipidea: core: fix possible concurrent when switch role
  usb: chipdea: core: fix return -EINVAL if request role is the same with current role
  dm thin: fix deadlock when swapping to thin device
  igb: revert rtnl_lock() that causes deadlock
  usb: gadget: u_audio: don't let userspace block driver unbind
  scsi: core: Add BLIST_SKIP_VPD_PAGES for SKhynix H28U74301AMR
  cifs: empty interface list when server doesn't support query interfaces
  sh: sanitize the flags on sigreturn
  net: usb: qmi_wwan: add Telit 0x1080 composition
  net: usb: cdc_mbim: avoid altsetting toggling for Telit FE990
  scsi: ufs: core: Add soft dependency on governor_simpleondemand
  scsi: target: iscsi: Fix an error message in iscsi_check_key()
  m68k: Only force 030 bus error if PC not in exception table
  ca8210: fix mac_len negative array access
  riscv: Bump COMMAND_LINE_SIZE value to 1024
  thunderbolt: Use const qualifier for `ring_interrupt_index`
  uas: Add US_FL_NO_REPORT_OPCODES for JMicron JMS583Gen 2
  hwmon (it87): Fix voltage scaling for chips with 10.9mV ADCs
  Bluetooth: btsdio: fix use after free bug in btsdio_remove due to unfinished work
  Bluetooth: btqcomsmd: Fix command timeout after setting BD address
  net: mdio: thunder: Add missing fwnode_handle_put()
  hvc/xen: prevent concurrent accesses to the shared ring
  net/sonic: use dma_mapping_error() for error check
  erspan: do not use skb_mac_header() in ndo_start_xmit()
  atm: idt77252: fix kmemleak when rmmod idt77252
  net/mlx5: Read the TC mapping of all priorities on ETS query
  bpf: Adjust insufficient default bpf_jit_limit
  net/ps3_gelic_net: Use dma_mapping_error
  net/ps3_gelic_net: Fix RX sk_buff length
  net: qcom/emac: Fix use after free bug in emac_remove due to race condition
  xirc2ps_cs: Fix use after free bug in xirc2ps_detach
  qed/qed_sriov: guard against NULL derefs from qed_iov_get_vf_info
  net: usb: smsc95xx: Limit packet length to skb->len
  scsi: scsi_dh_alua: Fix memleak for 'qdata' in alua_activate()
  i2c: imx-lpi2c: check only for enabled interrupt flags
  igbvf: Regard vf reset nack as success
  intel/igbvf: free irq on the error path in igbvf_request_msix()
  iavf: fix inverted Rx hash condition leading to disabled hash
  iavf: diet and reformat
  intel-ethernet: rename i40evf to iavf
  i40evf: Change a VF mac without reloading the VF driver
  power: supply: da9150: Fix use after free bug in da9150_charger_remove due to race condition

 Conflicts:
	kernel/cgroup/cpuset.c

Change-Id: Ic09017614f20bff94eb0b913bb7fb5b9656dc272
2023-05-05 19:40:17 +03:00
Greg Kroah-Hartman
7f1bf479be This is the 4.19.282 stable release
-----BEGIN PGP SIGNATURE-----
 
 iQIzBAABCAAdFiEEZH8oZUiU471FcZm+ONu9yGCSaT4FAmRI7ToACgkQONu9yGCS
 aT4xng//dh2IM5JCSF05cmbZuG081/1dgxJgsfY47AsQQJMbpw0To3goh+RhshCR
 UhpLZvStn/ZnxZ1XxV97+X+DfLy51wucsRWPObASserscDyD2jPaqe9kMPQxT/Ry
 TwxzQd2AjLmhsI1ej2bwTx4bL7I5t7J6Kr+kwFOxaajPUTPMzwHifbBw4b3sT+Fr
 YT18jthD1drK35sfWncre5ZBa1UTB00Vq0fK6o9yJ7oKPaJkouUnMDgVaIAitC0N
 pheoG4QifnlIDaBqzFxRppn/ekYjuzPaynBd/bkEjivk5lESYk4RRGWSABkV/zpe
 QcfTF3E1Eb5Qy/IkgvQfdGk57PBa4yet6KzrM71ml51VTmHTO+CLCjVxdH1EZ2CJ
 4IcIScnVsOPrOH+C3R1JyP12dB+DP9x5aLiqo6JUPAnfniisDieU/ho4izOfqaZm
 eXtAMOEImhbac/s/6s0uJVUlx9jaqoh28GkuIQWaXPsAO9tUrlcAzK3iLtu218Jn
 ynV4atSYm3RTj1c3ijzAaYr+zirHwD0E04PSTRpfCmX39Xznn2KfUgTtCBj3fm/O
 yvivLfA4CI9z8cewi+3V706dufvO70g9tRaowfyP1hMHYfFvr+rU7O/3HQcbii0J
 vccbacf54j4Y2raAF32Jv+1VvqmGZZAR1NpGYlc/4LxVlZ54p8k=
 =kncc
 -----END PGP SIGNATURE-----

Merge 4.19.282 into android-4.19-stable

Changes in 4.19.282
	ARM: dts: rockchip: fix a typo error for rk3288 spdif node
	net: sched: sch_qfq: prevent slab-out-of-bounds in qfq_activate_agg
	virtio_net: bugfix overflow inside xdp_linearize_page()
	i40e: fix accessing vsi->active_filters without holding lock
	i40e: fix i40e_setup_misc_vector() error handling
	mlxfw: fix null-ptr-deref in mlxfw_mfa2_tlv_next()
	e1000e: Disable TSO on i219-LM card to increase speed
	f2fs: Fix f2fs_truncate_partial_nodes ftrace event
	Input: i8042 - add quirk for Fujitsu Lifebook A574/H
	selftests: sigaltstack: fix -Wuninitialized
	scsi: megaraid_sas: Fix fw_crash_buffer_show()
	scsi: core: Improve scsi_vpd_inquiry() checks
	net: dsa: b53: mmap: add phy ops
	s390/ptrace: fix PTRACE_GET_LAST_BREAK error handling
	xen/netback: use same error messages for same errors
	nilfs2: initialize unused bytes in segment summary blocks
	memstick: fix memory leak if card device is never registered
	x86/purgatory: Don't generate debug info for purgatory.ro
	Revert "ext4: fix use-after-free in ext4_xattr_set_entry"
	ext4: remove duplicate definition of ext4_xattr_ibody_inline_set()
	ext4: fix use-after-free in ext4_xattr_set_entry
	udp: Call inet6_destroy_sock() in setsockopt(IPV6_ADDRFORM).
	tcp/udp: Call inet6_destroy_sock() in IPv6 sk->sk_destruct().
	inet6: Remove inet6_destroy_sock() in sk->sk_prot->destroy().
	dccp: Call inet6_destroy_sock() via sk->sk_destruct().
	sctp: Call inet6_destroy_sock() via sk->sk_destruct().
	counter: 104-quad-8: Fix race condition between FLAG and CNTR reads
	iio: adc: at91-sama5d2_adc: fix an error code in at91_adc_allocate_trigger()
	ASN.1: Fix check for strdup() success
	Linux 4.19.282

Change-Id: I35a16e29f98aa10e00d1e37d717ac1d0793fb5ed
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
2023-04-26 13:07:36 +00:00
Kuniyuki Iwashima
b165119e6c dccp: Call inet6_destroy_sock() via sk->sk_destruct().
commit 1651951ebea54970e0bda60c638fc2eee7a6218f upstream.

After commit d38afeec26ed ("tcp/udp: Call inet6_destroy_sock()
in IPv6 sk->sk_destruct()."), we call inet6_destroy_sock() in
sk->sk_destruct() by setting inet6_sock_destruct() to it to make
sure we do not leak inet6-specific resources.

DCCP sets its own sk->sk_destruct() in the dccp_init_sock(), and
DCCPv6 socket shares it by calling the same init function via
dccp_v6_init_sock().

To call inet6_sock_destruct() from DCCPv6 sk->sk_destruct(), we
export it and set dccp_v6_sk_destruct() in the init function.

Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ziyang Xuan <william.xuanziyang@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-26 11:21:53 +02:00
Kuniyuki Iwashima
e1820a9343 inet6: Remove inet6_destroy_sock() in sk->sk_prot->destroy().
commit b5fc29233d28be7a3322848ebe73ac327559cdb9 upstream.

After commit d38afeec26ed ("tcp/udp: Call inet6_destroy_sock()
in IPv6 sk->sk_destruct()."), we call inet6_destroy_sock() in
sk->sk_destruct() by setting inet6_sock_destruct() to it to make
sure we do not leak inet6-specific resources.

Now we can remove unnecessary inet6_destroy_sock() calls in
sk->sk_prot->destroy().

DCCP and SCTP have their own sk->sk_destruct() function, so we
change them separately in the following patches.

Signed-off-by: Kuniyuki Iwashima <kuniyu@amazon.com>
Reviewed-by: Matthieu Baerts <matthieu.baerts@tessares.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Ziyang Xuan <william.xuanziyang@huawei.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-04-26 11:21:53 +02:00