From mboxrd@z Thu Jan 1 00:00:00 1970 From: AL-KERNEL To: kernel-cve@kernelcve.org Subject: [CVE-2026-98739][IMPORTANT] Bluetooth: RFCOMM: Fix initial port reference race Date: Mon, 19 Oct 2026 04:34:00 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-AL-KERNEL-CVE: CVE-2026-98739 X-AL-KERNEL-Priority: IMPORTANT X-AL-KERNEL-Severity: IMPORTANT X-AL-KERNEL-Base-Severity: IMPORTANT X-AL-KERNEL-KPANIC: YES X-AL-KERNEL-ActionableScore: 6 X-AL-KERNEL-ActionableScore-Lower: 5 X-AL-KERNEL-Commit: a03ccf1ab77380d4c4a3c56552e12de4a83efa21 List-Id: CVE: CVE-2026-98739 Priority: IMPORTANT AL-KERNEL base severity: IMPORTANT KPANIC flag: YES Patch: Bluetooth: RFCOMM: Fix initial port reference race Commit: a03ccf1ab77380d4c4a3c56552e12de4a83efa21 Upstream patch: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=a03ccf1ab77380d4c4a3c56552e12de4a83efa21 Original CVE announcement: https://lore.kernel.org/linux-cve-announce/?q=CVE-2026-98739 Analysis date: Mon, 19 Oct 2026 04:34:00 -0400 ActionableScore: 6 ActionableScore lower bound: 5 Actionable bucket: Actionable Moderate / Strong Important candidate requiring manual review Manual review required: YES Summary: A race between RFCOMM TTY installation and device release can double-drop the initial tty_port reference and cause a confirmed four-byte use-after-free refcount write after TTY cleanup frees the device. ====================================================================== ABOUT THIS REPORT ====================================================================== The original Linux kernel CVE announcement for CVE-2026-98739 is available here: https://lore.kernel.org/linux-cve-announce/?q=CVE-2026-98739 The original announcement does not normally provide a security severity estimate, CVSS assessment, or enough information to determine whether the reported kernel bug represents a practically relevant security issue. This report was generated by AL-KERNEL, an AI-assisted Linux kernel vulnerability analysis system developed by Alexander Larkin. It combines an autonomous classifier with LLM-assisted technical analysis and a separate ActionableScore mechanism. The purpose of this report is to prioritize Linux kernel CVEs before manual review, identify cases that require prompt investigation, and support automatic closure of issues that are unlikely to have meaningful security impact. Published priority for this report: IMPORTANT Manual review required: YES A detailed explanation of the methodology and priority rules is included at the end of this message. ====================================================================== AL-KERNEL CLASSIFICATION RESULT ====================================================================== CVE-2026-98739 IMPORTANT https://www.kernelcve.org/list/?q=CVE-2026-98739 CHECK WITH IMPACT FROM ORIG NN MODERATE | AEGIS IMPACT MODERATE_KPANIC AEGIS_AS=5 LEGACY=IMPORTANT RESULT=DIFF INDEPENDENT_LEGACY=IMPORTANT INDEPENDENT_RESULT=DIFF TEMP_KPANIC_MERGE=IMPORTANT_WINS_DISAGREEMENT PRE_MERGE_LEGACY=IMPORTANT (final Legacy and Aegis differ; FINAL: IMPORTANT, Aegis: MODERATE_KPANIC) Maybe valid. Check manually. Hints by AL-KERNEL: The best (paranoid) CVSS is 'AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H';CWE-362;*CWE-416;CWE-911;Other CVSS 'AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:H';BEST CVSS score: '7';DESCR 'A race between rfcomm_tty_install() and __rfcomm_release_dev() can make both paths drop the same initial tty_port reference for an RFCOMM_RELEASE_ONHUP device. TTY cleanup can then free the rfcomm_dev before the release path performs its final tty_port_put(), producing a confirmed slab use-after-free write. The demonstrated primitive is a four byte write associated with reference handling rather than a controlled arbitrary write. However, reuse of the freed slab object creates a plausible risk of additional kernel memory corruption, kernel crash, or local privilege escalation. For the CVSS the PR:L value is used because a local user process must access the RFCOMM device ioctl path, while full administrative privileges are not demonstrated as necessary. AC:H is used because successful triggering depends on a specific timing window between installation, release, and asynchronous TTY cleanup. The issue is not directly network reachable based on the supplied call trace and source path, although Bluetooth peer activity may participate in the surrounding device lifecycle. Impact is at least a local denial of service via kernel crash and in the worst case may include confidentiality and integrity impact due to the confirmed use-after-free write. Automated impact decision path. The original SimpleNet classifier selected MODERATE_KPANIC. The primary LLM estimated paranoid CVSS 7 and the production ActionableScore returned 6 with recommendation Actionable Moderate / Strong Important candidate requiring manual review. The production rules then evaluated CVSS thresholds and ActionableScore thresholds. Recorded rule transitions were CVSS and initial triage stage MODERATE_KPANIC to IMPORTANT because the CVSS score, vector or bug class threshold rule was applied. The legacy KP specialist produced a review artifact and its decision was processed by the applicable KP rules. The legacy FD or DH downgrade specialist produced a review artifact and its decision was processed by the applicable downgrade and preservation rules. Exact triggered rule markers were INCREASED_TO_HIGH_BASED_ON_GUESSCVSS and TEMP_KPANIC_MERGE_IMPORTANT_WINS. The independent weaker Aegis shadow evaluated CVSS 4.1 and ActionableScore 5 with primitive class CLASS_B and manual review REQUIRED. Its independently reconciled impact was MODERATE_KPANIC. Cross model aggregation changed the production result under an enabled evidence gated merge rule. The final reported impact is IMPORTANT.';YES REQUIRES MANUAL CHECK; ,and ActionableScore result is Actionable Moderate / Strong Important candidate requiring manual review (with actual score 6) MAYBE REMOTE RACE ERRORPATH UAF NETWORK HARDWARE LINUS TEST KPANIC MEMORY KPANIC INCREASED_TO_HIGH_BASED_ON_GUESSCVSS TEMP_KPANIC_MERGE_IMPORTANT_WINS - - checked ====================================================================== ACTIONABLESCORE ANALYSIS ====================================================================== ActionableScore=6 ActionableScoreLower=5 PrimitiveClass=CLASS_B RealUAF=YES HostAdminRequired=UNKNOWN NamespaceScopedPrivilege=UNKNOWN ImportantCandidate=YES ManualReview=REQUIRED AutoDowngradeAllowed=NO RequiresHostUID0=UNKNOWN AuthorizationDecisionBypass=NO ProtectedResourceImpact=NONE B4PendingReview=NO B4PendingConfirmed=NO 1. ActionableScore * Raw conservative score: 5 * Conservative score: 5 * Raw paranoid score: 6 * Paranoid score: 6 * No floor or cap changed the final scores. The repeated-release mechanics independently satisfy the Floor 5 conditions. * Final recommended bucket: **Actionable Moderate / Strong Important candidate requiring manual review**:: 2. Signal breakdown Conservative signals: * +2 Real UAF and lifetime violation. TTY cleanup frees `rfcomm_dev`, after which the release path calls `tty_port_put()` on the embedded freed port. KASAN confirms a four-byte slab use-after-free write. * +1 Concrete repeated release and refcount mutation. Both install and release can drop the same initial reference, and the final release-side `tty_port_put()` mutates refcount state after the object may already have been freed. * +1 Attacker-influenced lifetime manipulation. Concurrent install and release operations drive the ownership transition and the vulnerable ordering rather than merely observing unrelated teardown. * +1 Strong DoS. The post-free refcount write can produce a KASAN failure, kernel fault, or corrupted lifetime state. Paranoid-only signal: * +1 Repeated-refcount paranoid leverage. The vulnerable final operation itself writes through `tty_port_put()` to storage whose original object lifetime has ended. This is a concrete unresolved post-free mutation, not merely generic speculation about slab reuse. No negative points: * No race penalty. The race requires a specific ordering, but the supplied evidence does not establish that repeated attempts are prohibitively narrow or externally uncontrollable. * No host-admin penalty. The exact credential checks for the complete RFCOMM create, install, and release sequence are not supplied. * No niche or hardware penalty. Bluetooth RFCOMM must be available, but unusual physical hardware or a rare boot mode is not established. Not awarded: * Controlled reclaim, attacker-selected replacement contents, arbitrary write, callback control, disclosure, and demonstrated LPE are not established. * Structured stale-object leverage is not separately awarded because the demonstrated stale operation is the already-counted refcount mutation. * Weak LPE is not separately awarded for the same repeated-release fact. * No additional availability point is awarded for the same crash. * Remote reachability is not established merely because RFCOMM is a Bluetooth protocol. * B5-R does not apply because there is no retry-accumulated heap OOB write. * B3-PENDING does not apply because no shared-backing write is involved. * B4-PENDING does not apply because no authorization decision changes from DENY to ALLOW. * V32, V33, and V34 do not apply because the patch does not involve skb checksum metadata or downstream packet-header corruption. Repeated-release findings: * The initial reference drops can contribute to ending the object lifetime: yes. * The exact `dev->port` reference remains reachable by the release path: yes. * The final `tty_port_put()` performs a real refcount mutation after free: yes. * Concrete repeated release or refcount +1 awarded: yes. * Paranoid repeated-refcount leverage +1 awarded: yes. * Floor 5 applicable: yes, but no adjustment was needed because the raw conservative score was already 5. 3. Reachability analysis The demonstrated entry path is a local `ioctl()` reaching `rfcomm_dev_ioctl()`. A local process can coordinate RFCOMM device installation and release, while asynchronous TTY cleanup supplies the freeing stage. The supplied patch and trace do not identify the effective credentials, capability checks, device-node permissions, or socket ownership requirements for the complete sequence. Therefore ordinary unprivileged reachability and host-admin-only reachability are both unproven. `HostAdminRequired` and `NamespaceScopedPrivilege` remain `UNKNOWN`, and no privilege bonus or penalty is applied. A usable RFCOMM device or connection and the relevant TTY lifecycle are prerequisites. Whether a remote Bluetooth peer can assist with hangup or connection state does not establish a network-only trigger because the vulnerable install and release operations remain local control-plane actions. The race requires the release path to observe the ownership bit before installation atomically claims it. The operations appear repeatable by concurrent local activity, so a hard-race penalty is not justified from the supplied evidence. 4. Primitive and severity interpretation The exact primitive is a four-byte post-free refcount write in `tty_port_put()` against an embedded `tty_port` belonging to an already freed `rfcomm_dev`. This is an active structured lifetime object, not a fixed stale DMA buffer. The stale operation occurs in release processing, but it is not an ordinary cleanup read followed by an immediate fault. It is category B repeated lifetime corruption: `initial reference drops -> TTY cleanup frees rfcomm_dev -> exact stale port remains reachable -> final tty_port_put mutates freed refcount storage` The first lifetime operations can enable destruction, and the final operation actively modifies memory after lifetime termination. This establishes `CLASS_B`, but not `CLASS_A`, because controlled reclaim, directed corruption, refcount takeover, and attacker-shaped replacement state are not shown. The demonstrated consequence is KASAN-detected UAF and plausible kernel crash or lifetime-state corruption. Further slab corruption and local privilege escalation remain unresolved possibilities rather than proven outcomes. `ImportantCandidate=YES` because the concrete second refcount mutation leaves meaningful post-lifetime corruption leverage unresolved. `AutoDowngradeAllowed=NO` because classifying the issue automatically as an ordinary crash-only cleanup UAF would discard that concrete write-like lifetime primitive. 5. One-sentence report phrase A race between RFCOMM TTY installation and device release can double-drop the initial tty_port reference and cause a confirmed four-byte use-after-free refcount write after TTY cleanup frees the device. 6. Manual review recommendation MANUAL CHECK REQUIRED The confirmed post-free refcount mutation is stronger than a shallow stale dereference, while its reclaim behavior, precise privilege boundary, and potential leverage beyond kernel crash remain unresolved. 7. Call-site confidence Call-site confidence: high ====================================================================== UPSTREAM PATCH SUMMARY ====================================================================== Patch: Bluetooth: RFCOMM: Fix initial port reference race Commit: a03ccf1ab77380d4c4a3c56552e12de4a83efa21 Upstream URL: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=a03ccf1ab77380d4c4a3c56552e12de4a83efa21 Commit description: For RFCOMM_RELEASE_ONHUP devices, rfcomm_tty_install() and __rfcomm_release_dev() both use RFCOMM_TTY_OWNED to decide who drops the initial tty_port reference. The release path tests the bit separately from the install path setting it, so both can drop that reference. The synchronous hangup does not prevent this race: port->tty is not assigned until tty_port_open(), after installation. The following interleaving is possible: 1. Install and release each obtain a reference with rfcomm_dev_get(). 2. Release observes RFCOMM_TTY_OWNED clear. 3. Install sets RFCOMM_TTY_OWNED and drops the initial reference. 4. Release drops the same initial reference again. 5. TTY cleanup drops its reference and frees the device. 6. Release performs its final tty_port_put() on the freed port. KASAN reported: BUG: KASAN: slab-use-after-free in tty_port_put+0x22/0x190 Write of size 4 at addr ffff8881001d3d5c by task poc/92 Call Trace: tty_port_put+0x22/0x190 rfcomm_dev_ioctl+0x1d4/0x1930 sock_do_ioctl+0x110/0x260 sock_ioctl+0x380/0x590 __x64_sys_ioctl+0x134/0x1c0 Allocated by task 88: rfcomm_dev_ioctl+0x8f6/0x1930 sock_do_ioctl+0x110/0x260 sock_ioctl+0x380/0x590 __x64_sys_ioctl+0x134/0x1c0 Freed by task 65: kfree+0x131/0x3c0 rfcomm_dev_destruct+0x23b/0x2f0 release_one_tty+0xc1/0x370 process_one_work+0x661/0x1090 Use test_and_set_bit() in both paths so that only the caller that changes RFCOMM_TTY_OWNED from clear to set drops the initial reference. Each path keeps its own lookup reference until release or TTY cleanup, preserving the existing callback ordering and error handling. Fixes: 80ea733 ("Bluetooth: Fix unreleased rfcomm_dev reference") Cc: stable@vger.kernel.org Assisted-by: LLM Signed-off-by: Chengfeng Ye Signed-off-by: Luiz Augusto von Dentz Signed-off-by: Greg Kroah-Hartman Changed files: net/bluetooth/rfcomm/tty.c Diff excerpt: Not included in this email. See the upstream URL for the full patch. Full patch: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=a03ccf1ab77380d4c4a3c56552e12de4a83efa21 ====================================================================== DETAILED REPORT METHODOLOGY ====================================================================== The original Linux kernel CVE announcement for CVE-2026-98739 can be found here: https://lore.kernel.org/linux-cve-announce/?q=CVE-2026-98739 The original CVE announcement normally does not include a security-level estimate. In particular, it may not contain a CVSS assessment, an impact level, or enough information to determine whether the reported bug is a practically relevant security issue. One purpose of this parallel CVE list is to provide that missing technical and prioritization information. The original goal of the AL-KERNEL project was to prioritize Linux kernel CVE analysis automatically before manual review. The system can also help identify non-security issues that may be suitable for automatic closure. This report was generated by AL-KERNEL, an AI-assisted Linux kernel vulnerability analysis system developed by Alexander Larkin. The first analysis stage combines an autonomous classifier with additional LLM-based analysis. The autonomous classifier runs locally on a CPU and is based on a backpropagation neural network. Together, these mechanisms produce a technical vulnerability description, identify likely weakness types, estimate CVSS severity, and provide input for ActionableScore. Two CVSS estimates are retained because incomplete kernel vulnerability information often permits more than one defensible interpretation: Conservative CVSS vector: AV:L/AC:H/PR:L/UI:N/S:U/C:L/I:L/A:H The Best / paranoid CVSS vector: AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H The Best / paranoid CVSS score: 7 The conservative vector represents a lower-impact interpretation. The Best/paranoid vector intentionally represents a plausible upper-bound interpretation and should not automatically be treated as demonstrated real-world impact. CVSS may also need to be adjusted for a particular Linux deployment, because actual reachability, privileges, enabled kernel configuration, hardware, namespaces, exposed device nodes, and other environmental conditions can differ significantly between systems. A separate ActionableScore mechanism evaluates practical remediation urgency. Its analysis may include reachability, attack prerequisites, subsystem exposure, memory-corruption characteristics, denial-of-service reliability, and possible confidentiality, integrity, or privilege-escalation impact. Conservative ActionableScore: 5 Paranoid ActionableScore: 6 The final base severity is taken directly from the second tab-separated field of the AL-KERNEL classification result. ActionableScore does not replace or independently override that final AL-KERNEL decision, and if ActionableScore adjusted impact level of ALKERNEL, then you would see self-readable flags above like INCREASED_TO_HIGH_BASED_ON_ACTIONABLESCOREHIGHEREQTHAN7. For an AL-KERNEL result of MODERATE, this report uses the following additional presentation split: ActionableScore below 5 -> MODERATE REGULAR ActionableScore 5 or more -> MODERATE 7.0 The distinction between MODERATE REGULAR and MODERATE 7.0 makes it possible to identify Moderate issues that should receive manual analysis and fixes before lower-priority MODERATE REGULAR issues. In many cases, MODERATE REGULAR fixes may wait for a later rebase or routine update. There is one override in which MODERATE REGULAR becomes MODERATE 7.0 even when the ActionableScore is below 5. When the AL-KERNEL result contains the KPANIC flag, a MODERATE result is always presented as MODERATE 7.0. The KPANIC flag selected with few regexps without usage of AI at all, so it helps to detect cases when Kernel Crash happens and similar (to filter False-Negative results from the LLM usage). KPANIC indicates that a reliable kernel crash, kernel panic, or similarly serious kernel availability impact was identified by the classification workflow. AL-KERNEL base severity for this report: IMPORTANT KPANIC detected for this report: YES Published priority for this report (same as in Subject): IMPORTANT These results are intended to support engineering triage. They are machine-generated estimates, and cases marked for manual review should be validated by a human security engineer before final disposition. For more info read docs linked from here: https://kernelcve.org/ (and you can submit you own patch there to generate such a report for non-existant CVE-id yet). Note that in many cases this AI tool selects higher severity, than real is (means you can expect Importants instead of Moderate 7.0 or Moderates 7.0 instead of regular Moderates). If you see such cases, please use reply email interface to add additional manual analyses info to this particular CVE. And please, please, let me know when you see Lows instead of Importants or Important instead of Low (because particular for such cases I need to tune this AI tool to make it better for this one and next similar). My contact email for such notifications is alexanjelausa@gmail.com (and both send reply to CVE record itself too and see "reply" button below for howto reply).