Buffer overflow in cupsSideChannelSNMPGet()
I maintainer di solito rispondono entro 1 giorno
@michaelrsweet ci sta già lavorando.
Dal 24/9/2026.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 45/100
Direzione di ricerca
The bug is in cups/sidechannel.c lines 322-331 in cupsSideChannelSNMPGet() and a similar function cupsSideChannelSNMPWalk(). Start by reading the sidechannel.c file to understand the buffer handling and the _cupsBufferGet() function. The fix involves checking that the null terminator is within real_datalen before using strlen, and correcting the size check in SNMPWalk. Test by building CUPS and running any sidechannel-related tests.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Problem:
cupsSideChannelSNMPGet() takes the OID length from strlen(real_data) + 1 without checking that the nul terminator is inside the real_datalen bytes the backend actually sent, so strlen() runs into the uninitialised tail of the _cupsBufferGet() buffer. real_datalen then goes negative, the "(real_datalen + 1) > *datalen" check passes for any caller buffer, and memcpy() gets (size_t)real_datalen as its size.
https://github.com/OpenPrinting/cups/blob/e72b70245fbe81242a959be0ed1cbfc9dbefcd9a/cups/sidechannel.c#L322-L331
cupsSideChannelSNMPWalk() has the same flaw and its guard against it, "if ((size_t)real_datalen < sizeof(real_data))", measures a char pointer instead of the 65540 byte buffer, so it only fires when real_datalen is below 8.
Found by Linux Verification Center (portal.linuxtesting.ru) with SVACE.
Reporter: Pavel Nekrasov ([email protected]).
- Lingua principale
- C
- Stelle
- 1.8k
- Fork
- 331
- Merge medio
- 15h 28m
- PR unite (30g)
- 5
Preparare l'ambiente
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di OpenPrinting/cups
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
OpenPrinting/cups#1721 ·
I maintainer di solito rispondono entro 1 giorno
-
I18n for CUPS webapp pagesAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 55/100
OpenPrinting/cups#1724 ·
I maintainer di solito rispondono entro 1 giorno
-
Integer overflow in httpGetDateTime()Forse già presa @michaelrsweet l’ha presa 3 giorni fa. Apertabug priority-low
Difficoltà 3/5 1-2 giorni Idoneità per principianti 65/100
OpenPrinting/cups#1717 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Integer overflow in show_supplies()Forse già presa @michaelrsweet l’ha presa 3 giorni fa. Apertaenhancement investigating
Difficoltà 3/5 1-2 giorni Idoneità per principianti 65/100
OpenPrinting/cups#1715 · 1 commento · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 38/100
OpenPrinting/cups#1707 · 4 commenti ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di OpenPrinting/cups
Issue simili
-
bug needs triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
netdata/netdata#24062 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
riscv-software-src/riscv-isa-sim#2448 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
NabuCasa/silabs-firmware-builder#231 · 1 commento ·