* [Bug 220422] New: USB: Misdecoded serial number from Dymo Twin Turbo (0922:0018) breaks multi-device support in CUPS
@ 2025-08-07 1:46 bugzilla-daemon
2025-08-07 1:48 ` [Bug 220422] " bugzilla-daemon
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: bugzilla-daemon @ 2025-08-07 1:46 UTC (permalink / raw)
To: linux-usb
https://bugzilla.kernel.org/show_bug.cgi?id=220422
Bug ID: 220422
Summary: USB: Misdecoded serial number from Dymo Twin Turbo
(0922:0018) breaks multi-device support in CUPS
Product: Drivers
Version: 2.5
Kernel Version: Mainline
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P3
Component: USB
Assignee: drivers_usb@kernel-bugs.kernel.org
Reporter: steve@groesz.org
Regression: No
Created attachment 308461
--> https://bugzilla.kernel.org/attachment.cgi?id=308461&action=edit
Dymo Twin Turbo Packet Capture
**Summary:**
The Linux USB core incorrectly decodes the serial number string descriptor of
the Dymo LabelWriter Twin Turbo printer (USB ID 0922:0018), resulting in
invalid or unreadable characters. This causes user-space tools such as CUPS to
generate incorrect or duplicate URIs, making it difficult or impossible to use
more than one device concurrently.
**System:**
* Distribution: Linux Mint 22.1
* Kernel: 6.8.0-71-generic (also affects mainline kernels)
* Architecture: x86\_64
* Device: Dymo LabelWriter Twin Turbo
* USB ID: 0922:0018
**Steps to Reproduce:**
1. Connect two Dymo Twin Turbo printers via USB.
2. Inspect `/sys/bus/usb/devices/*/serial` — the serials differ in raw binary
but decode to unreadable (non-ASCII) strings.
3. Run:
`lpinfo -v | grep usb`
→ Both devices appear as:
`usb://DYMO/LabelWriter%20Twin%20Turbo?serial=??????????????`
**Problem:**
Each printer reports a unique serial number at the descriptor level, but the
raw USB string descriptor data is misaligned or malformed. For example:
```
b'\x30\x30\x00\x36\x00\x31\x00\x30\x00\x33\x00\x30\x00\x31\x00\x30\x00\x31\x00\x36\x00\x31\x00\x35\x00\x37\x00\x35'
```
This is not properly aligned for UTF-16LE decoding. The kernel’s USB string
decoder (`usb_string_sub()` in `drivers/usb/core/message.c`) treats high bytes
as non-ASCII and replaces them with `?`, resulting in a decoded string like:
```
??????????????
```
This leads CUPS and other tools to construct identical URIs for both devices,
preventing proper multi-device support.
**Analysis:**
The descriptor appears to contain valid UTF-16LE if the first byte is skipped.
After correcting for this offset, the decoded string is:
```
"006103010161575"
```
This matches the `GET_DEVICE_ID` response from the device, confirming the
intended serial value.
The decoding logic in `usb_string_sub()` assumes correct UTF-16LE alignment and
does not handle malformed or misaligned descriptors, causing loss of unique
identifiers in sysfs and downstream applications.
**Expected Behavior:**
The kernel should decode USB string descriptors defensively, including recovery
from common misalignment issues in UTF-16LE encoding. Devices that return
malformed descriptors should still expose unique serial numbers if the raw data
permits recovery.
**Suggested Fixes:**
* Add fallback decoding logic (e.g., try shifted decoding if the result is all
`?`)
* Add a USB quirk for device ID 0922:0018 to apply corrected decoding
* Optionally expose raw descriptor data in sysfs for user-space tools to
perform recovery
I have attached a wireshark packet capture with sample packets from one device.
I can provide additional packet captures if needed.
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug 220422] USB: Misdecoded serial number from Dymo Twin Turbo (0922:0018) breaks multi-device support in CUPS
2025-08-07 1:46 [Bug 220422] New: USB: Misdecoded serial number from Dymo Twin Turbo (0922:0018) breaks multi-device support in CUPS bugzilla-daemon
@ 2025-08-07 1:48 ` bugzilla-daemon
2025-08-07 16:04 ` [Bug 220422] New: " Greg KH
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: bugzilla-daemon @ 2025-08-07 1:48 UTC (permalink / raw)
To: linux-usb
https://bugzilla.kernel.org/show_bug.cgi?id=220422
--- Comment #1 from steve@groesz.org ---
Created attachment 308462
--> https://bugzilla.kernel.org/attachment.cgi?id=308462&action=edit
lsusb data
Complete lsusb result for one of the label printers
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Bug 220422] New: USB: Misdecoded serial number from Dymo Twin Turbo (0922:0018) breaks multi-device support in CUPS
2025-08-07 1:46 [Bug 220422] New: USB: Misdecoded serial number from Dymo Twin Turbo (0922:0018) breaks multi-device support in CUPS bugzilla-daemon
2025-08-07 1:48 ` [Bug 220422] " bugzilla-daemon
@ 2025-08-07 16:04 ` Greg KH
2025-08-07 16:04 ` [Bug 220422] " bugzilla-daemon
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: Greg KH @ 2025-08-07 16:04 UTC (permalink / raw)
To: bugzilla-daemon; +Cc: linux-usb
On Thu, Aug 07, 2025 at 01:46:44AM +0000, bugzilla-daemon@kernel.org wrote:
> **Expected Behavior:**
> The kernel should decode USB string descriptors defensively, including recovery
> from common misalignment issues in UTF-16LE encoding. Devices that return
> malformed descriptors should still expose unique serial numbers if the raw data
> permits recovery.
The device should be fixed instead, how did this device pass the USB-IF
testing framework?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug 220422] USB: Misdecoded serial number from Dymo Twin Turbo (0922:0018) breaks multi-device support in CUPS
2025-08-07 1:46 [Bug 220422] New: USB: Misdecoded serial number from Dymo Twin Turbo (0922:0018) breaks multi-device support in CUPS bugzilla-daemon
2025-08-07 1:48 ` [Bug 220422] " bugzilla-daemon
2025-08-07 16:04 ` [Bug 220422] New: " Greg KH
@ 2025-08-07 16:04 ` bugzilla-daemon
2025-08-07 18:32 ` bugzilla-daemon
2025-08-08 0:45 ` bugzilla-daemon
4 siblings, 0 replies; 6+ messages in thread
From: bugzilla-daemon @ 2025-08-07 16:04 UTC (permalink / raw)
To: linux-usb
https://bugzilla.kernel.org/show_bug.cgi?id=220422
--- Comment #2 from gregkh@linuxfoundation.org ---
On Thu, Aug 07, 2025 at 01:46:44AM +0000, bugzilla-daemon@kernel.org wrote:
> **Expected Behavior:**
> The kernel should decode USB string descriptors defensively, including
> recovery
> from common misalignment issues in UTF-16LE encoding. Devices that return
> malformed descriptors should still expose unique serial numbers if the raw
> data
> permits recovery.
The device should be fixed instead, how did this device pass the USB-IF
testing framework?
thanks,
greg k-h
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug 220422] USB: Misdecoded serial number from Dymo Twin Turbo (0922:0018) breaks multi-device support in CUPS
2025-08-07 1:46 [Bug 220422] New: USB: Misdecoded serial number from Dymo Twin Turbo (0922:0018) breaks multi-device support in CUPS bugzilla-daemon
` (2 preceding siblings ...)
2025-08-07 16:04 ` [Bug 220422] " bugzilla-daemon
@ 2025-08-07 18:32 ` bugzilla-daemon
2025-08-08 0:45 ` bugzilla-daemon
4 siblings, 0 replies; 6+ messages in thread
From: bugzilla-daemon @ 2025-08-07 18:32 UTC (permalink / raw)
To: linux-usb
https://bugzilla.kernel.org/show_bug.cgi?id=220422
--- Comment #3 from steve@groesz.org ---
The device in question is a Dymo Labelwriter printer. Unfortunately, it's an
out of production model and I very much doubt the vendor will fix the device,
even if they could. It would likely need it's USB chip replaced and no vendor
would do that for an unsupported device.
As for how it passed USB-IF, I don't know.
This is why I believe a USB quirk patch would be most appropriate, to detect
this device by it's VID:PID and slightly change how it decodes the unique
device ID.
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug 220422] USB: Misdecoded serial number from Dymo Twin Turbo (0922:0018) breaks multi-device support in CUPS
2025-08-07 1:46 [Bug 220422] New: USB: Misdecoded serial number from Dymo Twin Turbo (0922:0018) breaks multi-device support in CUPS bugzilla-daemon
` (3 preceding siblings ...)
2025-08-07 18:32 ` bugzilla-daemon
@ 2025-08-08 0:45 ` bugzilla-daemon
4 siblings, 0 replies; 6+ messages in thread
From: bugzilla-daemon @ 2025-08-08 0:45 UTC (permalink / raw)
To: linux-usb
https://bugzilla.kernel.org/show_bug.cgi?id=220422
--- Comment #4 from steve@groesz.org ---
the easiest (least code) fix would be to drop the first two bytes and decode
the remaining data as utf-16-be (big endian) for affected devices. This will
yield usable and unique values that can be safely used by upstream tools.
I don't mind writing a patch but I am struggling a bit to understand how quirks
are written.
--
You may reply to this email to add a comment.
You are receiving this mail because:
You are watching the assignee of the bug.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2025-08-08 0:45 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-07 1:46 [Bug 220422] New: USB: Misdecoded serial number from Dymo Twin Turbo (0922:0018) breaks multi-device support in CUPS bugzilla-daemon
2025-08-07 1:48 ` [Bug 220422] " bugzilla-daemon
2025-08-07 16:04 ` [Bug 220422] New: " Greg KH
2025-08-07 16:04 ` [Bug 220422] " bugzilla-daemon
2025-08-07 18:32 ` bugzilla-daemon
2025-08-08 0:45 ` bugzilla-daemon
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).