Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 912261 - app-text/doxygen-1.9.7-r1 hitting "input buffer overflow, can't enlarge buffer because scanner uses REJECT"
Summary: app-text/doxygen-1.9.7-r1 hitting "input buffer overflow, can't enlarge buffe...
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Matthias Maier
URL: https://www.doxygen.nl/manual/faq.htm...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-08-14 06:45 UTC by Bernd Buschinski
Modified: 2024-01-13 13:04 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Bernd Buschinski 2023-08-14 06:45:05 UTC
Hello,

I am working on a big project, and using doxygen-1.9.7-r1, I am getting

```
input buffer overflow, can't enlarge buffer because scanner uses REJECT
```

which after some google pointed me to: https://www.doxygen.nl/manual/faq.html#faq_lex

which told me to rebuild Doxygen with -Denlarge_lex_buffers=1048576
(basically any higher number than 256k, I just multiplied it by 4, it was just a guess)

and it works fine now.

Problem: How can I cleanly do this here in Gentoo? For now, I created a local overlay and modified the ebuild to add this CMake option.
Maybe: (my proposal) this option should be set by default for all users, so they won't step into the same issue I did.


And for completeness:
```
# emerge --info
Portage 3.0.50 (python 3.11.4-final-0, default/linux/amd64/17.1/desktop/plasma, gcc-13, glibc-2.37-r4, 6.4.9-gentoo x86_64)
=================================================================
System uname: Linux-6.4.9-gentoo-x86_64-Intel-R-_Core-TM-_i7-10610U_CPU_@_1.80GHz-with-glibc2.37
KiB Mem:    16022720 total,   5536844 free
KiB Swap:   33554424 total,  33554424 free
Timestamp of repository gentoo: Mon, 14 Aug 2023 05:00:01 +0000
Head commit of repository gentoo: 7b9577ab2e78d1387fbce4cba2ad9a5dba044e09
Timestamp of repository kde: Tue, 08 Aug 2023 09:17:12 +0000
Head commit of repository kde: 05bba8646c075fa30482f96d9d31785be12d1076

sh bash 5.2_p15-r6
ld GNU ld (Gentoo 2.40 p6) 2.40.0
ccache version 4.8.2 [disabled]
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p15-r6::gentoo
dev-lang/perl:             5.38.0-r1::gentoo
dev-lang/python:           3.11.4::gentoo
dev-lang/rust:             1.71.1::gentoo
dev-util/ccache:           4.8.2::gentoo
dev-util/cmake:            3.27.2::gentoo
dev-util/meson:            1.2.1::gentoo
sys-apps/baselayout:       2.14::gentoo
sys-apps/openrc:           0.48::gentoo
sys-apps/sandbox:          2.38::gentoo
sys-devel/autoconf:        2.71-r7::gentoo
sys-devel/automake:        1.16.5-r1::gentoo
sys-devel/binutils:        2.40-r7::gentoo, 2.41-r1::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           15.0.7-r3::gentoo, 16.0.6::gentoo
sys-devel/gcc:             13.2.0::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/libtool:         2.4.7-r1::gentoo
sys-devel/lld:             15.0.7::gentoo
sys-devel/llvm:            15.0.7-r3::gentoo, 16.0.6::gentoo
sys-devel/make:            4.4.1-r1::gentoo
sys-kernel/linux-headers:  6.4::gentoo (virtual/os-headers)
sys-libs/glibc:            2.37-r4::gentoo
Repositories:

gentoo
    location: /usr/portage
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    volatile: True
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: yes
    sync-rsync-extra-opts: 
    sync-rsync-verify-max-age: 24

kde
    location: /var/db/repos/kde
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/kde.git
    masters: gentoo
    volatile: False

nb-local
    location: /usr/local/portage
    priority: 0
    volatile: True

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="@FREE FraunhoferFDK AdobeFlash-11.x google-chrome TeamViewer PUEL intel-ucode-20180807 MSttfEULA intel-ucode grass-ipafonts BitstreamCyberbit linux-fw-redistributable unRAR no-source-code CC-BY-NC-4.0 MPEG-4 FAH-EULA-2014 FAH-special-permission eula_tel.red Intel-SDP NPSL ms-teams-pre Turkowski RAR freedist NPSL-0.94 all-rights-reserved"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/usr/portage/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR XDG_STATE_HOME"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
LEX="flex"
LINGUAS="de en en-GB"
MAKEOPTS="-j9"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/var/tmp"
SHELL="/bin/bash"
USE="X a52 aac aacplus aacs acl acpi activities adns alsa amd64 amr amrenc aspell aufs avif bcg729 bdplus bluetooth bluray branding brightness-control brotli btrfs bzip2 cacert cairo cdda cddb cdr celt chm clang cli codec2 corefonts crypt cryptsetup cups dane dav1d dbus declarative device-mapper djvu dri dri3 dts dvd dvdr eap-sim ebook elogind emoji encode eps epspdf epub exif faac faad farstream ffmpeg fftw flac fontconfig fontforge foomaticdb fortran fpx gdbm gegl geoclue geoip geolocation gif git gpm graphite graphviz grub gui harfbuzz hdri heif http2 humanities hwaccel iconv icq icu id3tag idn imagemagick initramfs io-uring ipv6 jpeg jpeg2k jpegxl kde kwallet lcms libass libinput libmpv libnotify libproxy librtmp libsamplerate libsoxr libtirpc libxml2 lm-sensors lm_sensors lua lvm2create_initrd lz4 lzma lzo mad markdown matroska mdev mkv mng mobi mp3 mp4 mpeg mpv mpx multilib ncurses netlink networkmanager nfsv41 nghttp2 nls nptl ogg okteta openexr opengl openmp opus osmesa p2p pam pango pcap pcre pcre16 pdf pdfimport phonon pipewire pkcs11 plasma png policykit postscript ppds printsupport pulseaudio qalculate qml qt5 qthelp randpkt rar raw readline reviewboard rtsp samba sbc sbsms screencast sdl seccomp semantic-desktop sip smartcard smi smp snappy sound source-highlight sox spandsp speex spell split-usr sqlite ssh ssl startup-notification svg synaptics sync-plugin-portage system-harfbuzz system-icu system-jpeg system-jsoncpp system-libvpx system-sqlite taglib tahoma tdls test-rust tfshark theora threads thunderbolt tiff touchpad truetype twolame udev udisks unicode update_drivedb upower usb v4l vaapi vamp vc visio vorbis vpx vulkan wayland webp webready widgets winbind wmf wpg wps wxwidgets x264 x265 xattr xcb xetex xft xml xpm xv xvid xxhash xz zip zlib zstd" ABI_X86="64 32" ADA_TARGET="gnat_2021" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx avx2 f16c fma3 mmx mmxext pclmul popcnt rdrand sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="evdev keyboard mouse libinput synaptics" KERNEL="linux" L10N="de en en-GB" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" QEMU_SOFTMMU_TARGETS="x86_64 i386 ppc ppc64 ppcemb aarch64 arm mips mips64 mips64el mipsel" QEMU_USER_TARGETS="i386 ppc ppc64 ppc64abi32 ppc64le x86_64 aarch64 arm mips mips64 mips64el mipsel mipsn32 mipsn32el" RUBY_TARGETS="ruby32" VIDEO_CARDS="intel i965 iris" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
```

Reproducible: Always
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2023-08-14 06:50:37 UTC
For now, please try:
MYCMAKEARGS="-Denlarge_lex_buffers=1048576" emerge -v1 doxygen.

If that works, you can do this permanently via https://wiki.gentoo.org/wiki//etc/portage/package.env.

But we could probably do a USE flag for this given it's not easy to discover.
Comment 2 Bernd Buschinski 2023-08-14 07:11:51 UTC
Thanks for the hint!

MYCMAKEARGS="-Denlarge_lex_buffers=1048576" emerge -v1 doxygen

works fine. I have added it to my package.env (also works)