Skip to content

Commit

Permalink
Merge tag 'ASB-2024-06-05_4.19-stable' of https://android.googlesourc…
Browse files Browse the repository at this point in the history
…e.com/kernel/common into android13-4.19-kona

https://source.android.com/docs/security/bulletin/2024-06-01
CVE-2024-26926

* tag 'ASB-2024-06-05_4.19-stable' of https://android.googlesource.com/kernel/common:
  BACKPORT: net: fix __dst_negative_advice() race
  Linux 4.19.315
  docs: kernel_include.py: Cope with docutils 0.21
  serial: kgdboc: Fix NMI-safety problems from keyboard reset code
  tracing: Remove unnecessary var_ref destroy in track_data_destroy()
  tracing: Generalize hist trigger onmax and save action
  tracing: Split up onmatch action data
  tracing: Refactor hist trigger action code
  tracing: Have the historgram use the result of str_has_prefix() for len of prefix
  tracing: Use str_has_prefix() instead of using fixed sizes
  tracing: Use str_has_prefix() helper for histogram code
  string.h: Add str_has_prefix() helper function
  tracing: Consolidate trace_add/remove_event_call back to the nolock functions
  tracing: Remove unneeded synth_event_mutex
  tracing: Use dyn_event framework for synthetic events
  tracing: Add unified dynamic event framework
  tracing: Simplify creation and deletion of synthetic events
  btrfs: add missing mutex_unlock in btrfs_relocate_sys_chunks()
  dm: limit the number of targets and parameter size area
  Revert "selftests: mm: fix map_hugetlb failure on 64K page size systems"
  Linux 4.19.314
  af_unix: Suppress false-positive lockdep splat for spin_lock() in __unix_gc().
  net: fix out-of-bounds access in ops_init
  drm/vmwgfx: Fix invalid reads in fence signaled events
  dyndbg: fix old BUG_ON in >control parser
  tipc: fix UAF in error path
  usb: gadget: f_fs: Fix a race condition when processing setup packets.
  usb: gadget: composite: fix OS descriptors w_value logic
  firewire: nosy: ensure user_length is taken into account when fetching packet contents
  af_unix: Fix garbage collector racing against connect()
  af_unix: Do not use atomic ops for unix_sk(sk)->inflight.
  ipv6: fib6_rules: avoid possible NULL dereference in fib6_rule_action()
  net: bridge: fix corrupted ethernet header on multicast-to-unicast
  phonet: fix rtm_phonet_notify() skb allocation
  rtnetlink: Correct nested IFLA_VF_VLAN_LIST attribute validation
  Bluetooth: l2cap: fix null-ptr-deref in l2cap_chan_timeout
  Bluetooth: Fix use-after-free bugs caused by sco_sock_timeout
  tcp: Use refcount_inc_not_zero() in tcp_twsk_unique().
  tcp: defer shutdown(SEND_SHUTDOWN) for TCP_SYN_RECV sockets
  tcp: remove redundant check on tskb
  net:usb:qmi_wwan: support Rolling modules
  fs/9p: drop inodes immediately on non-.L too
  gpio: crystalcove: Use -ENOTSUPP consistently
  gpio: wcove: Use -ENOTSUPP consistently
  9p: explicitly deny setlease attempts
  fs/9p: translate O_TRUNC into OTRUNC
  fs/9p: only translate RWX permissions for plain 9P2000
  selftests: timers: Fix valid-adjtimex signed left-shift undefined behavior
  scsi: target: Fix SELinux error when systemd-modules loads the target module
  btrfs: always clear PERTRANS metadata during commit
  btrfs: make btrfs_clear_delalloc_extent() free delalloc reserve
  tools/power turbostat: Fix Bzy_MHz documentation typo
  tools/power turbostat: Fix added raw MSR output
  firewire: ohci: mask bus reset interrupts between ISR and bottom half
  ata: sata_gemini: Check clk_enable() result
  net: bcmgenet: Reset RBUF on first open
  ALSA: line6: Zero-initialize message buffers
  scsi: bnx2fc: Remove spin_lock_bh while releasing resources after upload
  net: mark racy access on sk->sk_rcvbuf
  wifi: mac80211: fix ieee80211_bss_*_flags kernel-doc
  gfs2: Fix invalid metadata access in punch_hole
  scsi: lpfc: Update lpfc_ramp_down_queue_handler() logic
  tipc: fix a possible memleak in tipc_buf_append
  net: bridge: fix multicast-to-unicast with fraglist GSO
  net: dsa: mv88e6xxx: Fix number of databases for 88E6141 / 88E6341
  net: dsa: mv88e6xxx: Add number of MACs in the ATU
  net l2tp: drop flow hash on forward
  nsh: Restore skb->{protocol,data,mac_header} for outer header in nsh_gso_segment().
  bna: ensure the copied buf is NUL terminated
  s390/mm: Fix clearing storage keys for huge pages
  s390/mm: Fix storage key clearing for guest huge pages
  pinctrl: devicetree: fix refcount leak in pinctrl_dt_to_map()
  power: rt9455: hide unused rt9455_boost_voltage_values
  pinctrl: core: delete incorrect free in pinctrl_enable()
  ethernet: Add helper for assigning packet type when dest address does not match device address
  ethernet: add a helper for assigning port addresses
  net: slightly optimize eth_type_trans
  drm/amdgpu: Fix leak when GPU memory allocation fails
  drm/amdkfd: change system memory overcommit limit
  wifi: nl80211: don't free NULL coalescing rule
  dmaengine: Revert "dmaengine: pl330: issue_pending waits until WFP state"
  dmaengine: pl330: issue_pending waits until WFP state
  Linux 4.19.313
  serial: core: fix kernel-doc for uart_port_unlock_irqrestore()
  udp: preserve the connected status if only UDP cmsg
  Revert "y2038: rusage: use __kernel_old_timeval"
  Revert "loop: Remove sector_t truncation checks"
  HID: i2c-hid: remove I2C_HID_READ_PENDING flag to prevent lock-up
  i2c: smbus: fix NULL function pointer dereference
  idma64: Don't try to serve interrupts when device is powered off
  dmaengine: owl: fix register access functions
  tcp: Fix NEW_SYN_RECV handling in inet_twsk_purge()
  tcp: Clean up kernel listener's reqsk in inet_twsk_purge()
  mtd: diskonchip: work around ubsan link failure
  stackdepot: respect __GFP_NOLOCKDEP allocation flag
  net: b44: set pause params only when interface is up
  irqchip/gic-v3-its: Prevent double free on error
  arm64: dts: rockchip: enable internal pull-up for Q7_THRM# on RK3399 Puma
  btrfs: fix information leak in btrfs_ioctl_logical_to_ino()
  Bluetooth: Fix type of len in {l2cap,sco}_sock_getsockopt_old()
  tracing: Increase PERF_MAX_TRACE_SIZE to handle Sentinel1 and docker together
  tracing: Show size of requested perf buffer
  Revert "crypto: api - Disallow identical driver names"
  drm/amdgpu: validate the parameters of bo mapping operations more clearly
  amdgpu: validate offset_in_bo of drm_amdgpu_gem_va
  drm/amdgpu: restrict bo mapping within gpu address limits
  serial: mxs-auart: add spinlock around changing cts state
  serial: core: Provide port lock wrappers
  i40e: Do not use WQ_MEM_RECLAIM flag for workqueue
  net: openvswitch: Fix Use-After-Free in ovs_ct_exit
  net: openvswitch: ovs_ct_exit to be done under ovs_lock
  ipvs: Fix checksumming on GSO of SCTP packets
  net: gtp: Fix Use-After-Free in gtp_dellink
  net: usb: ax88179_178a: stop lying about skb->truesize
  NFC: trf7970a: disable all regulators on removal
  mlxsw: core: Unregister EMAD trap using FORWARD action
  vxlan: drop packets from invalid src-address
  ARC: [plat-hsdk]: Remove misplaced interrupt-cells property
  arm64: dts: mediatek: mt7622: drop "reset-names" from thermal block
  arm64: dts: mediatek: mt7622: fix ethernet controller "compatible"
  arm64: dts: mediatek: mt7622: fix IR nodename
  arm64: dts: rockchip: enable internal pull-up on PCIE_WAKE# for RK3399 Puma
  arm64: dts: rockchip: fix alphabetical ordering RK3399 puma
  tracing: Use var_refs[] for hist trigger reference checking
  tracing: Remove hist trigger synth_var_refs
  nilfs2: fix OOB in nilfs_set_de_type
  nouveau: fix instmem race condition around ptr stores
  fs: sysfs: Fix reference leak in sysfs_break_active_protection()
  speakup: Avoid crash on very long word
  usb: dwc2: host: Fix dereference issue in DDMA completion flow.
  Revert "usb: cdc-wdm: close race between read and workqueue"
  USB: serial: option: add Telit FN920C04 rmnet compositions
  USB: serial: option: add Rolling RW101-GL and RW135-GL support
  USB: serial: option: support Quectel EM060K sub-models
  USB: serial: option: add Lonsung U8300/U9300 product
  USB: serial: option: add support for Fibocom FM650/FG650
  USB: serial: option: add Fibocom FM135-GL variants
  serial/pmac_zilog: Remove flawed mitigation for rx irq flood
  comedi: vmk80xx: fix incomplete endpoint checking
  drm: nv04: Fix out of bounds access
  RDMA/mlx5: Fix port number for counter query in multi-port configuration
  tun: limit printing rate when illegal packet received by tun dev
  netfilter: nf_tables: Fix potential data-race in __nft_expr_type_get()
  netfilter: nf_tables: __nft_expr_type_get() selects specific family type
  Revert "tracing/trigger: Fix to return error if failed to alloc snapshot"
  kprobes: Fix possible use-after-free issue on kprobe registration
  selftests/ftrace: Limit length in subsystem-enable tests
  btrfs: record delayed inode root in transaction
  x86/apic: Force native_apic_mem_read() to use the MOV instruction
  selftests: timers: Fix abs() warning in posix_timers test
  vhost: Add smp_rmb() in vhost_vq_avail_empty()
  tracing: hide unused ftrace_event_id_fops
  net/mlx5: Properly link new fs rules into the tree
  ipv6: fix race condition between ipv6_get_ifaddr and ipv6_del_addr
  ipv4/route: avoid unused-but-set-variable warning
  ipv6: fib: hide unused 'pn' variable
  geneve: fix header validation in geneve[6]_xmit_skb
  nouveau: fix function cast warning
  Bluetooth: Fix memory leak in hci_req_sync_complete()
  batman-adv: Avoid infinite loop trying to resize local TT

 Conflicts:
	drivers/net/usb/ax88179_178a.c

Change-Id: I73f07cafe3403d98dad2e4a8b34f89cfbd49818c
  • Loading branch information
mikeNG committed Jun 22, 2024
2 parents aab8bf6 + 079d4f3 commit 18144fa
Show file tree
Hide file tree
Showing 142 changed files with 1,925 additions and 1,012 deletions.
1 change: 0 additions & 1 deletion Documentation/sphinx/kernel_include.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,6 @@ def _run(self):
# HINT: this is the only line I had to change / commented out:
#path = utils.relative_path(None, path)

path = nodes.reprunicode(path)
encoding = self.options.get(
'encoding', self.state.document.settings.input_encoding)
e_handler=self.state.document.settings.input_encoding_error_handler
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0
VERSION = 4
PATCHLEVEL = 19
SUBLEVEL = 312
SUBLEVEL = 315
EXTRAVERSION =
NAME = "People's Front"

Expand Down
2 changes: 1 addition & 1 deletion arch/alpha/kernel/osf_sys.c
Original file line number Diff line number Diff line change
Expand Up @@ -964,7 +964,7 @@ put_tv32(struct timeval32 __user *o, struct timespec64 *i)
}

static inline long
put_tv_to_tv32(struct timeval32 __user *o, struct __kernel_old_timeval *i)
put_tv_to_tv32(struct timeval32 __user *o, struct timeval *i)
{
return copy_to_user(o, &(struct timeval32){
.tv_sec = i->tv_sec,
Expand Down
1 change: 0 additions & 1 deletion arch/arc/boot/dts/hsdk.dts
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,6 @@
};

gmac: ethernet@8000 {
#interrupt-cells = <1>;
compatible = "snps,dwmac";
reg = <0x8000 0x2000>;
interrupts = <10>;
Expand Down
7 changes: 2 additions & 5 deletions arch/arm64/boot/dts/mediatek/mt7622.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@
clock-names = "hif_sel";
};

cir: cir@10009000 {
cir: ir-receiver@10009000 {
compatible = "mediatek,mt7622-cir";
reg = <0 0x10009000 0 0x1000>;
interrupts = <GIC_SPI 175 IRQ_TYPE_LEVEL_LOW>;
Expand Down Expand Up @@ -459,7 +459,6 @@
<&pericfg CLK_PERI_AUXADC_PD>;
clock-names = "therm", "auxadc";
resets = <&pericfg MT7622_PERI_THERM_SW_RST>;
reset-names = "therm";
mediatek,auxadc = <&auxadc>;
mediatek,apmixedsys = <&apmixedsys>;
nvmem-cells = <&thermal_calibration>;
Expand Down Expand Up @@ -846,9 +845,7 @@
};

eth: ethernet@1b100000 {
compatible = "mediatek,mt7622-eth",
"mediatek,mt2701-eth",
"syscon";
compatible = "mediatek,mt7622-eth";
reg = <0 0x1b100000 0 0x20000>;
interrupts = <GIC_SPI 223 IRQ_TYPE_LEVEL_LOW>,
<GIC_SPI 224 IRQ_TYPE_LEVEL_LOW>,
Expand Down
29 changes: 22 additions & 7 deletions arch/arm64/boot/dts/rockchip/rk3399-puma.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -426,16 +426,22 @@
gpio1830-supply = <&vcc_1v8>;
};

&pmu_io_domains {
status = "okay";
pmu1830-supply = <&vcc_1v8>;
};

&pwm2 {
status = "okay";
&pcie_clkreqn_cpm {
rockchip,pins =
<2 RK_PD2 RK_FUNC_GPIO &pcfg_pull_up>;
};

&pinctrl {
pinctrl-names = "default";
pinctrl-0 = <&q7_thermal_pin>;

gpios {
q7_thermal_pin: q7-thermal-pin {
rockchip,pins =
<0 RK_PA3 RK_FUNC_GPIO &pcfg_pull_up>;
};
};

i2c8 {
i2c8_xfer_a: i2c8-xfer {
rockchip,pins =
Expand Down Expand Up @@ -466,6 +472,15 @@
};
};

&pmu_io_domains {
status = "okay";
pmu1830-supply = <&vcc_1v8>;
};

&pwm2 {
status = "okay";
};

&sdhci {
/*
* Signal integrity isn't great at 200MHz but 100MHz has proven stable
Expand Down
2 changes: 1 addition & 1 deletion arch/s390/mm/gmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -2583,7 +2583,7 @@ static int __s390_enable_skey_hugetlb(pte_t *pte, unsigned long addr,
return 0;

start = pmd_val(*pmd) & HPAGE_MASK;
end = start + HPAGE_SIZE - 1;
end = start + HPAGE_SIZE;
__storage_key_init_range(start, end);
set_bit(PG_arch_1, &page->flags);
return 0;
Expand Down
2 changes: 1 addition & 1 deletion arch/s390/mm/hugetlbpage.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ static void clear_huge_pte_skeys(struct mm_struct *mm, unsigned long rste)
}

if (!test_and_set_bit(PG_arch_1, &page->flags))
__storage_key_init_range(paddr, paddr + size - 1);
__storage_key_init_range(paddr, paddr + size);
}

void set_huge_pte_at(struct mm_struct *mm, unsigned long addr,
Expand Down
3 changes: 2 additions & 1 deletion arch/x86/include/asm/apic.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include <asm/mpspec.h>
#include <asm/msr.h>
#include <asm/hardirq.h>
#include <asm/io.h>

#define ARCH_APICTIMER_STOPS_ON_C3 1

Expand Down Expand Up @@ -110,7 +111,7 @@ static inline void native_apic_mem_write(u32 reg, u32 v)

static inline u32 native_apic_mem_read(u32 reg)
{
return *((volatile u32 *)(APIC_BASE + reg));
return readl((void __iomem *)(APIC_BASE + reg));
}

extern void native_apic_wait_icr_idle(void);
Expand Down
1 change: 0 additions & 1 deletion crypto/algapi.c
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@ static struct crypto_larval *__crypto_register_alg(struct crypto_alg *alg)
}

if (!strcmp(q->cra_driver_name, alg->cra_name) ||
!strcmp(q->cra_driver_name, alg->cra_driver_name) ||
!strcmp(q->cra_name, alg->cra_driver_name))
goto err;
}
Expand Down
5 changes: 4 additions & 1 deletion drivers/ata/sata_gemini.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,10 @@ int gemini_sata_start_bridge(struct sata_gemini *sg, unsigned int bridge)
pclk = sg->sata0_pclk;
else
pclk = sg->sata1_pclk;
clk_enable(pclk);
ret = clk_enable(pclk);
if (ret)
return ret;

msleep(10);

/* Do not keep clocking a bridge that is not online */
Expand Down
4 changes: 4 additions & 0 deletions drivers/dma/idma64.c
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@ static irqreturn_t idma64_irq(int irq, void *dev)
u32 status_err;
unsigned short i;

/* Since IRQ may be shared, check if DMA controller is powered on */
if (status == GENMASK(31, 0))
return IRQ_NONE;

dev_vdbg(idma64->dma.dev, "%s: status=%#x\n", __func__, status);

/* Check if we have any interrupt from the DMA controller */
Expand Down
4 changes: 2 additions & 2 deletions drivers/dma/owl-dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ static void pchan_update(struct owl_dma_pchan *pchan, u32 reg,
else
regval &= ~val;

writel(val, pchan->base + reg);
writel(regval, pchan->base + reg);
}

static void pchan_writel(struct owl_dma_pchan *pchan, u32 reg, u32 data)
Expand All @@ -254,7 +254,7 @@ static void dma_update(struct owl_dma *od, u32 reg, u32 val, bool state)
else
regval &= ~val;

writel(val, od->base + reg);
writel(regval, od->base + reg);
}

static void dma_writel(struct owl_dma *od, u32 reg, u32 data)
Expand Down
6 changes: 4 additions & 2 deletions drivers/firewire/nosy.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,10 +161,12 @@ packet_buffer_get(struct client *client, char __user *data, size_t user_length)
if (atomic_read(&buffer->size) == 0)
return -ENODEV;

/* FIXME: Check length <= user_length. */
length = buffer->head->length;

if (length > user_length)
return 0;

end = buffer->data + buffer->capacity;
length = buffer->head->length;

if (&buffer->head->data[length] < end) {
if (copy_to_user(data, buffer->head->data, length))
Expand Down
6 changes: 5 additions & 1 deletion drivers/firewire/ohci.c
Original file line number Diff line number Diff line change
Expand Up @@ -2066,6 +2066,8 @@ static void bus_reset_work(struct work_struct *work)

ohci->generation = generation;
reg_write(ohci, OHCI1394_IntEventClear, OHCI1394_busReset);
if (param_debug & OHCI_PARAM_DEBUG_BUSRESETS)
reg_write(ohci, OHCI1394_IntMaskSet, OHCI1394_busReset);

if (ohci->quirks & QUIRK_RESET_PACKET)
ohci->request_generation = generation;
Expand Down Expand Up @@ -2132,12 +2134,14 @@ static irqreturn_t irq_handler(int irq, void *data)
return IRQ_NONE;

/*
* busReset and postedWriteErr must not be cleared yet
* busReset and postedWriteErr events must not be cleared yet
* (OHCI 1.1 clauses 7.2.3.2 and 13.2.8.1)
*/
reg_write(ohci, OHCI1394_IntEventClear,
event & ~(OHCI1394_busReset | OHCI1394_postedWriteErr));
log_irqs(ohci, event);
if (event & OHCI1394_busReset)
reg_write(ohci, OHCI1394_IntMaskClear, OHCI1394_busReset);

if (event & OHCI1394_selfIDComplete)
queue_work(selfid_workqueue, &ohci->bus_reset_work);
Expand Down
2 changes: 1 addition & 1 deletion drivers/gpio/gpio-crystalcove.c
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ static inline int to_reg(int gpio, enum ctrl_register reg_type)
case 0x5e:
return GPIOPANELCTL;
default:
return -EOPNOTSUPP;
return -ENOTSUPP;
}
}

Expand Down
2 changes: 1 addition & 1 deletion drivers/gpio/gpio-wcove.c
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ static inline unsigned int to_reg(int gpio, enum ctrl_register reg_type)
unsigned int reg;

if (gpio >= WCOVE_GPIO_NUM)
return -EOPNOTSUPP;
return -ENOTSUPP;

if (reg_type == CTRL_IN)
reg = GPIO_IN_CTRL_BASE + gpio;
Expand Down
Loading

0 comments on commit 18144fa

Please sign in to comment.