Config file buffer limit

Bug #1373726 reported by Zach Riggle
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ltrace (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

The routine read_config_file is still using a statically sized buffer. Almost two years ago this was fixed in upstream.

This breaks when using very long config file lines. For example, trying to set an enum for all enumerated error numbers in errno (see below).

daefa4a - Use getline instead of static buffer in read_config_file (1 year, 7 months ago) - Petr Machata

To reproduce, create a file named ~/.ltrace.conf with the following line:

typedef errno=enum ( EPERM=1, ENOENT=2, ESRCH=3, EINTR=4, EIO=5, ENXIO=6, E2BIG=7, ENOEXEC=8, EBADF=9, ECHILD=10, EAGAIN=11, ENOMEM=12, EACCES=13, EFAULT=14, ENOTBLK=15, EBUSY=16, EEXIST=17, EXDEV=18, ENODEV=19, ENOTDIR=20, EISDIR=21, EINVAL=22, ENFILE=23, EMFILE=24, ENOTTY=25, ETXTBSY=26, EFBIG=27, ENOSPC=28, ESPIPE=29, EROFS=30, EMLINK=31, EPIPE=32, EDOM=33, ERANGE=34, EDEADLK=35, ENAMETOOLONG=36, ENOLCK=37, ENOSYS=38, ENOTEMPTY=39, ELOOP=40, EWOULDBLOCK=11, ENOMSG=42, EIDRM=43, ECHRNG=44, EL2NSYNC=45, EL3HLT=46, EL3RST=47, ELNRNG=48, EUNATCH=49, ENOCSI=50, EL2HLT=51, EBADE=52, EBADR=53, EXFULL=54, ENOANO=55, EBADRQC=56, EBADSLT=57, EDEADLOCK=35, EBFONT=59, ENOSTR=60, ENODATA=61, ETIME=62, ENOSR=63, ENONET=64, ENOPKG=65, EREMOTE=66, ENOLINK=67, EADV=68, ESRMNT=69, ECOMM=70, EPROTO=71, EMULTIHOP=72, EDOTDOT=73, EBADMSG=74, EOVERFLOW=75, ENOTUNIQ=76, EBADFD=77, EREMCHG=78, ELIBACC=79, ELIBBAD=80, ELIBSCN=81, ELIBMAX=82, ELIBEXEC=83, EILSEQ=84, ERESTART=85, ESTRPIPE=86, EUSERS=87, ENOTSOCK=88, EDESTADDRREQ=89, EMSGSIZE=90, EPROTOTYPE=91, ENOPROTOOPT=92, EPROTONOSUPPORT=93, ESOCKTNOSUPPORT=94, EOPNOTSUPP=95, EPFNOSUPPORT=96, EAFNOSUPPORT=97, EADDRINUSE=98, EADDRNOTAVAIL=99, ENETDOWN=100, ENETUNREACH=101, ENETRESET=102, ECONNABORTED=103, ECONNRESET=104, ENOBUFS=105, EISCONN=106, ENOTCONN=107, ESHUTDOWN=108, ETOOMANYREFS=109, ETIMEDOUT=110, ECONNREFUSED=111, EHOSTDOWN=112, EHOSTUNREACH=113, EALREADY=114, EINPROGRESS=115, ESTALE=116, EUCLEAN=117, ENOTNAM=118, ENAVAIL=119, EISNAM=120, EREMOTEIO=121, EDQUOT=122, ENOMEDIUM=123, EMEDIUMTYPE=124, ECANCELED=125, ENOKEY=126, EKEYEXPIRED=127, EKEYREVOKED=128, EKEYREJECTED=129);

Revision history for this message
Heinrich Schuchardt (xypron) wrote :

With the ~/.ltrace.conf described above the problem is reproducible on Ubuntu 21.04, 0.7.3-6.1ubuntu2.

$ ltrace ls
/home/user/.ltrace.conf:1: error: expected ')', got '
/home/user/.ltrace.conf:2: error: unknown type around ', EMSGSIZE=90, EPROTOTYPE=91, ENOPROTOOPT=92, EPROTONOSUPPORT=93, ESOCKTNOSUPPORT=94, EOPNOTSUPP=95, EPFNO

To which upstream do you relate? Please, provide a link to the upstream patch.

Best regards

Heinrich

Changed in ltrace (Ubuntu):
status: New → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.