In the Linux kernel, the following vulnerability has been resolved:
staging: rtl8723bs: fix mismatched free of HalData in rtwsdioif1init()
padapter->HalData is allocated via vzalloc(), but incorrectly freed using kfree() in the rtwsdioif1init() error path. Using kfree() to release this vmalloc-backed buffer can lead to memory corruption.
Use rtwhaldatadeinit() to pair the free correctly and free HalData with vfree().
The bug was first flagged by an experimental static analysis tool we are developing for kernel memory-management bugs. Manual inspection confirms that the issue is still present in current mainline.
An x8664 allyesconfig build showed no new warnings. As we do not have suitable RTL8723BS SDIO hardware to test with, no runtime testing was able to be performed.
afpacket: Don't cast tpackethdr.tplen to int in tpacketparseheader().
In the Linux kernel, the following vulnerability has been resolved:
staging: fbtft: make dirtylock IRQ-safe
fbtftmkdirty() can be reached from the fbcon rendering path while processing printk() in hardirq context. Meanwhile, dirtylock is also taken by fbtftdeferredio() in workqueue context with local interrupts enabled.
Lockdep reports a possible IRQ lock inversion involving dirtylock and consoleowner. A hardirq can interrupt a CPU holding dirtylock and enter the console rendering path, which can attempt to acquire dirtylock again.
The following lockdep report was observed on an RK3566 system with CONFIGPROVELOCKING enabled:
WARNING: possible irq lock inversion dependency detected swapper/2/0 just changed the state of lock: (consoleowner){-...}-{0:0} but this lock took another, HARDIRQ-unsafe lock in the past: (&par->dirtylock){+.+.}-{2:2}
CPU0 CPU1 ---- ---- lock(&par->dirtylock); localirqdisable(); lock(consoleowner); lock(&par->dirtylock); <Interrupt> lock(consoleowner);
DEADLOCK
Use spinlockirqsave() for fbtftmkdirty() and spinlockirq() for fbtftdeferredio(). They only access the dirty line range, so the IRQ-off regions remain short.
btrfs: detach failed sprout device from transaction update list
In the Linux kernel, the following vulnerability has been resolved:
sched/rt,dl: Skip migrate-disabled tasks when picking a push candidate
A migratedisable()'d RT task cannot be moved to another CPU, but the scheduler still keeps such a task on that CPU's pushable list (rq->rt.pushabletasks) and still marks the runqueue RT-overloaded (rq->rt.overloaded = 1). So the RT balancer keeps treating this CPU as having a task to move away, and keeps trying to move the task, but the push can never succeed. When the head is pinned, pushrttask() does not give up either. It falls back to pushing rq->curr instead, using the per-CPU stopper, as added by commit a7c81556ec4d ("sched: Fix migratedisable() vs rt/dl balancing").
The CPU spends tens of milliseconds in this retry loop. The core is isolated for real-time work, but during the loop nearly half of its time is consumed by pushes that cannot succeed.
An ftrace capture of the affected CPU, with schedswitch enabled and commit 94894c9c477e ("sched/rt: Skip currently executing CPU in rtonextcpu()") applied, shows where the CPU time went. Two SCHEDFIFO tasks at equal priority shared the CPU, taskA migratedisable()'d and queued, taskB as rq->curr. In one 89 ms window, taskB got only 52 ms of CPU. The other 37 ms went to the stopper thread.
The scheduler kept trying to push taskA, the pinned head of the pushable list, fell back to pushing taskB instead, and woke the stopper 5204 times. Every one of those pushes failed and no task was moved. taskA stayed runnable and queued the whole time, and never ran.
Pushing taskB fails on a re-check. findlocklowestrq() drops the rq lock to take the target rq lock, then checks again with "task != picknextpushabletask(rq)".
The task being pushed is taskB, but the pick returns taskA, the head of the pushable list. taskB is rq->curr, and setnexttaskrt() removes the running task from that list, so taskB can never be the head. The check expects a candidate taken from the pushable list, but the fallback pushes rq->curr, which is never on that list. So the check fails every time.
.--> push-IPI arrives | | | v | pushable head = taskA -> pinned, cannot be pushed | | | v | so push taskB instead -> wake migration/N, a stop-class | | thread, so it preempts taskB | v | re-check compares taskB against the pushable head, | which is still taskA -> give up | | | v | nothing moved, taskA still queued, rq still overloaded | | '----------' repeats every ~17 us, 5204 times, for 89 ms
The loop cannot stop itself. Every round leaves the runqueue exactly as it was, so the next push-IPI does the same thing. In the capture it ended only when taskB went to sleep on its own. taskA was then picked locally and left the pushable list.
CPU time per task in the window, from schedswitch:
taskB 51.95 ms real work migration/N 37.18 ms nothing moved taskA 0.00 ms queued the whole time, never picked idle 0.01 ms
Counts over the same window:
7667 push-IPIs handled on this CPU 17481 picknextpushabletask() returned taskA, still pinned 5204 findlocklowestrq() gave up on the re-check 1 push that actually completed 0 migrations of taskA
The CPU times and the window length come from the standard schedswitch tracepoint. The counts needed tracepoints added inside the RT balancer for this investigation.
The self-IPI path is closed by the rtonextcpu() fix above, and that part works. But the runqueue is still marked overloaded, because the pinned task is still advertised as pushable. Other CPUs now send the push-IPIs during their own RT balancing, and the same loop runs again. Closing the self-IPI path did not stop a pinn ---truncated---
btrfs: do not force reloc root creation during qgroupaccountsnapshot()
bonding: do not clear curractiveslave prematurely when releasing all slaves
bpf: Fix NULL-ptr-deref in btfvarshow()
bpf: Fix NULL-ptr-deref when showing a void BTF type
In the Linux kernel, the following vulnerability has been resolved:
wifi: p54: validate RX frame length in p54rxeepromreadback()
p54rxeepromreadback() copies the requested EEPROM slice out of a device-supplied readback frame without checking that the skb actually holds that many bytes. Commit da1b9a55ff11 ("wifi: p54: prevent buffer-overflow in p54rxeepromreadback()") closed the destination overflow by copying a fixed priv->eepromslicesize (and rejecting a mismatched advertised len), but the source side is still unbounded: nothing verifies the frame is long enough to supply that many bytes.
A malicious USB device can send a short frame whose advertised len matches priv->eepromslicesize while the payload is truncated. The equality check passes and memcpy() reads past the end of the skb, leaking adjacent heap:
BUG: KASAN: slab-out-of-bounds in p54rx (drivers/net/wireless/intersil/p54/txrx.c:507) Read of size 1016 at addr ffff88800f077114 by task swapper/0/0 Call Trace: <IRQ> ... asanmemcpy (mm/kasan/shadow.c:105) p54rx (drivers/net/wireless/intersil/p54/txrx.c:507) p54urxcb (drivers/net/wireless/intersil/p54/p54usb.c:163) usbhcdgivebackurb (drivers/usb/core/hcd.c:1657) dummytimer (drivers/usb/gadget/udc/dummyhcd.c:2005) ... </IRQ>
The buggy address belongs to the object at ffff88800f0770c0 which belongs to the cache skbuffsmallhead of size 704 The buggy address is located 84 bytes inside of allocated 704-byte region [ffff88800f0770c0, ffff88800f077380)
Check that the slice fits in the skb before copying.
In the Linux kernel, the following vulnerability has been resolved:
mpls: fix NULL deref in mplsvalidfibdumpreq() on CONFIGINET=n
On CONFIGINET=n builds, mplsvalidfibdumpreq() walks the parsed attribute table itself instead of calling ipvalidfibdumpreq(). The RTAOIF arm passes tb[RTAOIF] to nlagetu32() without checking it is present, so an RTMGETROUTE dump for AFMPLS with strict checking and no RTAOIF hits a NULL dereference.
RTMGETROUTE is RTNLKINDGET, which rtnetlinkrcvmsg() permits without CAPNETADMIN, so an unprivileged user can trigger it.
Oops: general protection fault, probably for non-canonical address 0xdffffc0000000000: 0000 [#1] SMP KASAN NOPTI KASAN: null-ptr-deref in range [0x0000000000000000-0x0000000000000007] RIP: 0010:mplsvalidfibdumpreq (net/mpls/afmpls.c:2189) Call Trace: mplsdumproutes (net/mpls/afmpls.c:2236) netlinkdump (net/netlink/afnetlink.c:2331) netlinkdumpstart (net/netlink/afnetlink.c:2446) rtnetlinkrcvmsg (net/core/rtnetlink.c:7033) netlinkrcvskb (net/netlink/afnetlink.c:2556) netlinkunicast (net/netlink/afnetlink.c:1345) netlinksendmsg (net/netlink/afnetlink.c:1900) socksendmsg (net/socket.c:790) syssendmsg (net/socket.c:2684) syssendmsg (net/socket.c:2738) syssendmsg (net/socket.c:2770) dosyscall64 (arch/x86/entry/syscall64.c:94) entrySYSCALL64afterhwframe (arch/x86/entry/entry64.S:121)
Skip unset attributes, as ipvalidfibdumpreq() does.
In the Linux kernel, the following vulnerability has been resolved:
Input: ims-pcu - fix heap-buffer-overflow in imspcuprocessdata()
The imspcuprocessdata() processes incoming URB data byte by byte. However, it fails to check if the readpos index exceeds IMSPCUBUFSIZE.
If a malicious USB device sends a packet larger than IMSPCUBUFSIZE, readpos will increment indefinitely. Moreover, since readpos is located immediately after readbuf, the attacker can overwrite readpos itself to arbitrarily control the index.
This manipulated readpos is subsequently used in imspcuhandleresponse() to copy data into cmdbuf, leading to a heap buffer overflow.
Specifically, an attacker can overwrite the cmddone.wait.head located at offset 136 relative to cmdbuf in the imspcuhandleresponse(). Consequently, when the driver calls complete(&pcu->cmddone), it triggers a control flow hijack by using the manipulated pointer.
Fix this by adding a bounds check for readpos before writing to readbuf. If the packet is too long, discard it, log a warning, and reset the parser state.
[dtor: factor out resetting packet state, reset checksum as well]
In the Linux kernel, the following vulnerability has been resolved:
rhashtable: clear stale iter->p on table restart
rhashtablewalkstartcheck() has two restart paths when resuming a walk. When iter->walker.tbl is valid, it re-validates iter->p against the table and sets iter->p = NULL if the object is gone. When iter->walker.tbl is NULL (table was freed during resize), it resets slot and skip but forgets to clear iter->p.
rhashtablewalknext() then dereferences the stale iter->p, reading freed memory. This is a use-after-free.
Any caller that does multi-fragment rhashtable walks across walkstop/walkstart boundaries is affected. Concrete cases include netlinkdiag (netlinkdiagdump in net/netlink/diag.c) and TIPC (tipcnlskwalk in net/tipc/socket.c).
Crash stack (netlinkdiag): BUG: KASAN: slab-use-after-free in rhashtablewalknext+0x365/0x3c0 Read of size 8 at addr ffff88801a9d2438 (freed kmalloc-2k, offset 1080) Call Trace: rhashtablewalknext+0x365/0x3c0 (lib/rhashtable.c:1016) netlinkdiagdump+0x160/0x760 (net/netlink/diag.c:122) netlinkdiagdump+0xc2/0x240 netlinkdump+0x5bc/0x1270 netlinkrecvmsg+0x7a3/0x980 sockrecvmsg+0x1bc/0x200 sysrecvfrom+0x1d4/0x2c0
In the Linux kernel, the following vulnerability has been resolved:
net: psample: fix info leak in PSAMPLEATTRDATA
psample open codes nlaput() presumably to avoid wiping the data with 0s just to override it with packet data. This open coding is missing clearing the pad, however, each netlink attr is padded to 4B and datalen may not be divisible by 4B.
In the Linux kernel, the following vulnerability has been resolved:
sctp: validate STALECOOKIE cause length before reading staleness
When an ERROR chunk with a STALECOOKIE cause is received in the COOKIEECHOED state, sctpsfdo526stale() reads the 4-byte Measure of Staleness that follows the cause header:
err = (struct sctperrhdr )(chunk->skb->data); stale = ntohl((be32 )((u8 )err + sizeof(err)));
err is the first cause in the chunk, not the STALECOOKIE cause that caused the dispatch, and nothing guarantees the staleness field is present. sctpwalkerrors() only requires a cause to be as long as the 4-byte header, so for a STALECOOKIE cause of length 4 the read runs past the cause, and for a minimal ERROR chunk past skb->tail. The value is echoed to the peer in the Cookie Preservative of the reply INIT, leaking uninitialized memory.
sctpsfcookieechoederr() already walks to the STALECOOKIE cause, so check its length there and pass it to sctpsfdo526stale(), which reads that cause instead of the first one. A STALECOOKIE cause too short to hold the staleness field is discarded.
The read is reachable by any peer that can drive an association into COOKIEECHOED, including an unprivileged process using a raw SCTP socket in a user and network namespace.
In the Linux kernel, the following vulnerability has been resolved:
net: qualcomm: rmnet: validate MAP frame length before ingress parsing
When ingress deaggregation is disabled, rmnetmapingresshandler() passes the skb straight to rmnetmapingresshandler(), skipping the length validation that rmnetmapdeaggregate() performs on the aggregated path. The parser then dereferences the MAP header and csum header/trailer based on the on-wire pktlen without checking skb->len, so a short frame is read out of bounds:
BUG: KASAN: slab-out-of-bounds in rmnetmapchecksumdownlinkpacket Read of size 1 at addr ffff88801118ed00 by task exploit/147 Call Trace: ... rmnetmapchecksumdownlinkpacket (drivers/net/ethernet/qualcomm/rmnet/rmnetmapdata.c:413) rmnetmapingresshandler (drivers/net/ethernet/qualcomm/rmnet/rmnethandlers.c:96) rmnetrxhandler (drivers/net/ethernet/qualcomm/rmnet/rmnethandlers.c:129) netifreceiveskbcore.constprop.0 (net/core/dev.c:6089) netifreceiveskb (net/core/dev.c:6460) tungetuser (drivers/net/tun.c:1955) tunchrwriteiter (drivers/net/tun.c:2001) vfswrite (fs/readwrite.c:688) ksyswrite (fs/readwrite.c:740) dosyscall64 (arch/x86/entry/syscall64.c:94) ...
Factor that validation out of rmnetmapdeaggregate() into rmnetmapvalidatepacketlen() and run it on the no-aggregation path too. The MAP header is bounds-checked first, since this path can receive a frame shorter than the header.
drm/edid: fix OOB read in drmparsetiledblock()
In the Linux kernel, the following vulnerability has been resolved:
net: usb: net1080: validate packetlen before pad-byte access in rxfixup
For an even packetlen, net1080rxfixup() reads the pad byte at skb->data[packetlen] before the skb->len != packetlen check further down, and packetlen is only bounded against NCMAXPACKET. A malicious NetChip 1080 device can send a short frame advertising a large even packetlen (e.g. 0x4000), so the pad-byte read lands past the end of the skb:
BUG: KASAN: slab-out-of-bounds in net1080rxfixup Read of size 1 at addr ffff8880106c83c6 by task ksoftirqd/0/14 ... net1080rxfixup (drivers/net/usb/net1080.c:384) usbnetbh (drivers/net/usb/usbnet.c:1589) processonework (kernel/workqueue.c:3322) bhworker (kernel/workqueue.c:3708) taskletaction (kernel/softirq.c:965) handlesoftirqs (kernel/softirq.c:622) ...
Reject the frame when packetlen >= skb->len before reading.
In the Linux kernel, the following vulnerability has been resolved:
usbnet: gl620a: fix out-of-bounds read in genelinkrxfixup()
genelinkrxfixup() splits an aggregated RX frame into its individual packets, using a per-packet length taken from device-supplied data. That length is only bounded by GLMAXPACKETLEN (1514); it is never compared against how many bytes were actually received.
A malicious GeneLink (GL620A) device can therefore send a short URB whose header claims packetcount > 1 and a first packet of up to 1514 bytes.
skbputdata(glskb, packet->packetdata, size);
then copies past the end of the receive buffer and hands the adjacent slab contents up the network stack, an out-of-bounds read that leaks kernel heap. No privilege is required: the path runs in the usbnet RX softirq as soon as the interface is up.
BUG: KASAN: slab-out-of-bounds in genelinkrxfixup (drivers/net/usb/gl620a.c:112) Read of size 1514 at addr ffff888011309708 by task ksoftirqd/0/14 Call Trace: ... asanmemcpy (mm/kasan/shadow.c:105) genelinkrxfixup (include/linux/skbuff.h:2814 drivers/net/usb/gl620a.c:112) usbnetbh (drivers/net/usb/usbnet.c:572 drivers/net/usb/usbnet.c:1589) processonework (kernel/workqueue.c:3322) bhworker (kernel/workqueue.c:3405) taskletaction (kernel/softirq.c:965) handlesoftirqs (kernel/softirq.c:622) runksoftirqd (kernel/softirq.c:1076) ...
skbpull() already verifies that the requested length fits the buffer and returns NULL otherwise. Move it ahead of the copy and check its result, so a packet that overruns the received data is rejected before it is read. Well-formed frames, whose packets are fully present, are unaffected.
In the Linux kernel, the following vulnerability has been resolved:
ipv6: Fix null-ptr-deref in fib6nhmtuchange().
fib6nhmtuchange() re-fetches idev via in6devget(arg->dev) and dereferences idev->cnf.mtu6 without a NULL check. addrconfifdown() clears dev->ip6ptr with RCUINITPOINTER() after rt6disableip() has released tb6lock, so the RA-driven MTU walk can observe a NULL idev and oops. The caller rt6mtuchangeroute() guards its own in6devget(), but this re-fetch is unguarded; nexthop-backed routes survive addrconfifdown()'s flush, so the walk still reaches it after ip6ptr is nulled.
Return 0 when idev is NULL, matching rt6mtuchangeroute() and the fib6mtu() fix in commit 5ad509c1fdad ("ipv6: Fix null-ptr-deref in fib6mtu().").
Oops: general protection fault, ... KASAN: null-ptr-deref in range [0x00000000000002a8-0x00000000000002af] RIP: 0010:fib6nhmtuchange+0x203/0x990 rt6mtuchangeroute+0x141/0x1d0 fib6cleanall+0xd0/0x160 rt6mtuchange+0xb4/0x100 ndiscrouterdiscovery+0x24b5/0x2cb0 icmpv6rcv+0x12e9/0x1710 ipv6rcv+0x39b/0x410
In the Linux kernel, the following vulnerability has been resolved:
bridge: cfm: reject invalid CCM interval at configuration time
ccmtxworkexpired() re-arms itself via queuedelayedwork() using the configured expinterval converted by intervaltous(). When expinterval is BRCFMCCMINTERVALNONE or out of range, intervaltous() returns 0, causing the worker to fire immediately in a tight loop that allocates skbs until OOM.
Fix this by validating expinterval at configuration time:
- Constrain IFLABRIDGECFMCCCONFIGEXPINTERVAL to the valid range [BRCFMCCMINTERVAL33MS, BRCFMCCMINTERVAL10MIN] in the netlink policy so userspace cannot set an invalid value.
- Reject starting CCM TX in brcfmccccmtx() when expinterval has not yet been configured (defaults to 0 from kzalloc).
In the Linux kernel, the following vulnerability has been resolved:
tty: serial: samsung: Remove redundant port lock acquisition in rx helpers
Sashiko identified a deadlock when the console flow is engaged [1].
When console flow control is enabled (UPFCONSFLOW), s3c24xxserialstoptx() calls s3c24xxserialrxenable() and s3c24xxserialstarttx() calls s3c24xxserialrxdisable().
The serial core framework invokes the .stoptx() and .starttx() callbacks with the port->lock spinlock already held. Furthermore, all internal driver paths that invoke stoptx (such as the DMA TX completion handler s3c24xxserialtxdmacomplete() or the PIO TX IRQ handler s3c24xxserialtxirq()) also acquire port->lock prior to calling it. (Note that s3c24xxserialstarttx() is only invoked by the serial core).
However, s3c24xxserialrxenable() and s3c24xxserialrxdisable() unconditionally attempt to acquire port->lock again using uartportlockirqsave(). Since spinlocks are not recursive, this causes a deadlock on the same CPU when console flow control is engaged.
Remove the redundant lock acquisition from both rx helper functions.
In the Linux kernel, the following vulnerability has been resolved:
iio: accel: bmc150: clamp the device-reported FIFO frame count
bmc150accelfifoflush() copies the number of samples the device reports in its hardware FIFO into an on-stack buffer
u16 buffer[BMC150ACCELFIFOLENGTH 3];
which is sized for at most BMC150ACCELFIFOLENGTH (32) samples. The frame count is read from the FIFOSTATUS register and only masked to its 7 valid bits:
count = val & 0x7F;
so it can be 0..127. The only other limit applied to it is the optional caller-supplied sample budget:
if (samples && count > samples) count = samples;
which does not constrain count on the flush-all path (samples == 0), and leaves it well above 32 whenever samples is larger. count samples are then transferred into buffer[]:
bmc150accelfifotransfer(data, (u8 )buffer, count);
bmc150accelfifotransfer() reads count 6 bytes through regmap, so a malfunctioning, malicious or counterfeit accelerometer (or an attacker tampering with the I2C/SPI bus) that reports up to 127 frames writes up to 762 bytes into the 192-byte buffer: a stack out-of-bounds write of up to 570 bytes that clobbers the stack canary, saved registers and the return address.
Clamp count to BMC150ACCELFIFOLENGTH, the number of samples buffer[] is sized for, before the transfer, mirroring the watermark clamp already done in bmc150accelsetwatermark(). A well-formed flush reports at most BMC150ACCELFIFOLENGTH frames, so legitimate devices are unaffected.
In the Linux kernel, the following vulnerability has been resolved:
iio: accel: kxsd9: fix runtime PM imbalance on writeraw() error
kxsd9writeraw() takes a runtime PM reference with pmruntimegetsync() but returns -EINVAL directly when a scale with a non-zero integer part is requested, skipping the matching pmruntimeputautosuspend(). This leaks a runtime PM usage-counter reference on every such write, after which the device can no longer autosuspend.
Set the error code and fall through to the existing put instead of returning early.
In the Linux kernel, the following vulnerability has been resolved:
iio: adc: lpc32xx: Initialize completion before requesting IRQ
In the report from Jaeyoung Chung:
"lpc32xxadcprobe() in drivers/iio/adc/lpc32xxadc.c registers its interrupt handler with devmrequestirq() before it initializes st->completion with initcompletion(). If an interrupt arrives after devmrequestirq() and before initcompletion(), the handler calls complete() on an uninitialized completion, causing a kernel panic.
The probe path, in lpc32xxadcprobe():
iodev = devmiiodevicealloc(&pdev->dev, sizeof(st)); / st kzalloc-zeroed / ... retval = devmrequestirq(&pdev->dev, irq, lpc32xxadcisr, 0, LPC32XXADNAME, st); / register handler / ... initcompletion(&st->completion); / initialize completion /
lpc32xxadcisr() calls complete():
complete(&st->completion);
If the device raises an interrupt before initcompletion() runs, complete() acquires the uninitialized wait.lock and walks the zeroed tasklist in swakeuplocked(). The zeroed tasklist makes listempty() return false, so swakeuplocked() dereferences a NULL list entry, triggering a KASAN wild-memory-access."
Fix the chance of a spurious IRQ causing an uninitialized pointer dereference by moving initcompletion() above devmrequestirq().
In the Linux kernel, the following vulnerability has been resolved:
ALSA: aoa: check sndctlnew1() return value
sndctlnew1() can return NULL when memory allocation fails. In layout.c, the function does not check the return value before dereferencing ctl->id.name or passing to aoasndctladd(), which can lead to a NULL pointer dereference.
Add NULL checks after sndctlnew1() calls and return early if any fails.
ALSA: caiaq: fix out-of-bounds read in the Traktor Kontrol S4 input parser
In the Linux kernel, the following vulnerability has been resolved:
ALSA: es1938: check sndctlnew1() return value
sndctlnew1() can return NULL when memory allocation fails. sndes1938mixer() does not check the return value before dereferencing the pointer, which can lead to a NULL pointer dereference.
Add a NULL check after sndctlnew1() and return -ENOMEM if it fails.
In the Linux kernel, the following vulnerability has been resolved:
ALSA: firewire: isight: bound the sample count to the packet payload
isightpacket() takes the frame count from the device iso packet and checks it only against the device claimed iso length.
count = be32tocpu(payload->samplecount); if (likely(count <= (length - 16) / 4)) isightsamples(isight, payload->samples, count);
length is the iso header datalength. It can be up to 0xffff. So the gate allows a count up to about 16379. isightsamples() then copies count frames out of payload->samples into the PCM DMA buffer.
payload->samples holds only 2 MAXFRAMESPERPACKET values. The device multiplexes two samples per frame. A count past MAXFRAMESPERPACKET reads past the payload. A count past the buffer size writes past runtime->dmaarea. The smallest PCM buffer is larger than MAXFRAMESPERPACKET. Bounding the count to MAXFRAMESPERPACKET keeps both the read and the write in range.
A malicious or faulty Apple iSight on the FireWire bus reaches this during a normal capture.
Add the MAXFRAMESPERPACKET bound to the gate.
Bluetooth: btusb: fix use-after-free on registration failure