---
id: CVE-2023-34966
title: 'Samba: infinite loop in mdssvc rpc service for spotlight'
summary: >-
  An infinite loop vulnerability was found in Samba's mdssvc RPC service for
  Spotlight. When parsing Spotlight mdssvc RPC packets sent by the client, the
  core unmarshalling function sl_unpack_loop() did not validate a field in the
  network …
severity: high
cvss: 7.5
cvssVector: 'CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H'
cvssSource: cna
cwe:
  - CWE-835
vendor: Red Hat
product: samba
affected:
  - samba (all versions)
  - samba (all versions)
  - samba (all versions)
  - samba (all versions)
  - samba (all versions)
  - samba (all versions)
  - samba (all versions)
  - samba (all versions)
  - samba
  - samba4
  - samba
  - samba
published: '2023-07-20'
updated: '2026-11-07'
sourceUpdated: '2026-11-07T06:13:26.660Z'
source: CVEORG
sourceUrl: 'https://www.cve.org/CVERecord?id=CVE-2023-34966'
references:
  - url: 'https://access.redhat.com/errata/RHSA-2023:6667'
    label: 'RHSA-2023:6667'
  - url: 'https://access.redhat.com/errata/RHSA-2023:7139'
    label: 'RHSA-2023:7139'
  - url: 'https://access.redhat.com/errata/RHSA-2024:0423'
    label: 'RHSA-2024:0423'
  - url: 'https://access.redhat.com/errata/RHSA-2024:0580'
    label: 'RHSA-2024:0580'
  - url: 'https://access.redhat.com/errata/RHSA-2024:4101'
    label: 'RHSA-2024:4101'
  - url: 'https://access.redhat.com/security/cve/CVE-2023-34966'
  - url: 'https://bugzilla.redhat.com/show_bug.cgi?id=2222793'
    label: RHBZ#2222793
  - url: 'https://www.samba.org/samba/security/CVE-2023-34966'
tags:
  - cve.org
epss: 0.62402
epssPercentile: 0.9919
ingestedAt: '2026-11-07T07:12:31.885Z'
---

## Overview

An infinite loop vulnerability was found in Samba's mdssvc RPC service for Spotlight. When parsing Spotlight mdssvc RPC packets sent by the client, the core unmarshalling function sl_unpack_loop() did not validate a field in the network packet that contains the count of elements in an array-like structure. By passing 0 as the count value, the attacked function will run in an endless loop consuming 100% CPU. This flaw allows an attacker to issue a malformed RPC request, triggering an infinite loop, resulting in a denial of service condition.

## Affected

- `samba (all versions)`
- `samba (all versions)`
- `samba (all versions)`
- `samba (all versions)`
- `samba (all versions)`
- `samba (all versions)`
- `samba (all versions)`
- `samba (all versions)`
- `samba`
- `samba4`
- `samba`
- `samba`

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.

### Workarounds

As a possible workaround, disable Spotlight by removing all configuration stanzas ("spotlight=yes|true") that enable Spotlight .
