Uploaded image for project: 'CFEngine Community'
  1. CFEngine Community
  2. CFE-602

Using string larger than 4096 characters leads to buffer overflow error in CFEngine 3.4.4

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.6.x
    • Component/s: Evaluation
    • Labels:
      None
    • Platform:
      Other (details)
    • Found in version (details):
      3.4.1
    • Steps to reproduce:
      Manual steps provided

      Description

      I've just upgraded some configs from CFEngine 3.2.4 to 3.4.4, and previously working code now leads to buffer overflow error.
      The promise is attached (as it is quite big)
      The problem occurs with :
      CFEngine 3.4.1
      CFEngine 3.4.4
      Rudder CFEngine 3.4.4

      On Debian, Ubuntu, sles

      On CFEngine 3.2.4, there was no problem

      1. cf-agent -KI

      <pre>

          • buffer overflow detected ***: /var/rudder/cfengine-community/bin/cf-promises terminated
            ======= Backtrace: =========
            /lib/x86_64-linux-gnu/libc.so.6(__fortify_fail+0x37)[0x7f159ff7f007]
            /lib/x86_64-linux-gnu/libc.so.6(+0x107f00)[0x7f159ff7df00]
            /var/rudder/cfengine-community/bin/cf-promises[0x425239]
            /var/rudder/cfengine-community/bin/cf-promises[0x427439]
            /var/rudder/cfengine-community/bin/cf-promises[0x4277c7]
            /var/rudder/cfengine-community/bin/cf-promises[0x40fc04]
            /var/rudder/cfengine-community/bin/cf-promises[0x41001b]
            /var/rudder/cfengine-community/bin/cf-promises[0x41ba92]
            /var/rudder/cfengine-community/bin/cf-promises[0x41c07a]
            /var/rudder/cfengine-community/bin/cf-promises[0x40526f]
            /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xed)[0x7f159fe9776d]
            /var/rudder/cfengine-community/bin/cf-promises[0x405331]
            ======= Memory map: ========
            00400000-004a2000 r-xp 00000000 fd:01 16053 /var/rudder/cfengine-community/bin/cf-promises
            006a1000-006a2000 r--p 000a1000 fd:01 16053 /var/rudder/cfengine-community/bin/cf-promises
            006a2000-006a7000 rw-p 000a2000 fd:01 16053 /var/rudder/cfengine-community/bin/cf-promises
            006a7000-006c9000 rw-p 00000000 00:00 0
            01832000-019c8000 rw-p 00000000 00:00 0 [heap]
            7f159e9d5000-7f159e9ea000 r-xp 00000000 fd:01 262869 /lib/x86_64-linux-gnu/libgcc_s.so.1
            7f159e9ea000-7f159ebe9000 ---p 00015000 fd:01 262869 /lib/x86_64-linux-gnu/libgcc_s.so.1
            7f159ebe9000-7f159ebea000 r--p 00014000 fd:01 262869 /lib/x86_64-linux-gnu/libgcc_s.so.1
            7f159ebea000-7f159ebeb000 rw-p 00015000 fd:01 262869 /lib/x86_64-linux-gnu/libgcc_s.so.1
            7f159ebeb000-7f159ebf5000 r-xp 00000000 fd:01 263064 /lib/x86_64-linux-gnu/libnss_nis-2.15.so
            7f159ebf5000-7f159edf5000 ---p 0000a000 fd:01 263064 /lib/x86_64-linux-gnu/libnss_nis-2.15.so
            7f159edf5000-7f159edf6000 r--p 0000a000 fd:01 263064 /lib/x86_64-linux-gnu/libnss_nis-2.15.so
            7f159edf6000-7f159edf7000 rw-p 0000b000 fd:01 263064 /lib/x86_64-linux-gnu/libnss_nis-2.15.so
            7f159edf7000-7f159ee0e000 r-xp 00000000 fd:01 263058 /lib/x86_64-linux-gnu/libnsl-2.15.so
            7f159ee0e000-7f159f00d000 ---p 00017000 fd:01 263058 /lib/x86_64-linux-gnu/libnsl-2.15.so
            7f159f00d000-7f159f00e000 r--p 00016000 fd:01 263058 /lib/x86_64-linux-gnu/libnsl-2.15.so
            7f159f00e000-7f159f00f000 rw-p 00017000 fd:01 263058 /lib/x86_64-linux-gnu/libnsl-2.15.so
            7f159f00f000-7f159f011000 rw-p 00000000 00:00 0
            7f159f011000-7f159f019000 r-xp 00000000 fd:01 263066 /lib/x86_64-linux-gnu/libnss_compat-2.15.so
            7f159f019000-7f159f218000 ---p 00008000 fd:01 263066 /lib/x86_64-linux-gnu/libnss_compat-2.15.so
            7f159f218000-7f159f219000 r--p 00007000 fd:01 263066 /lib/x86_64-linux-gnu/libnss_compat-2.15.so
            7f159f219000-7f159f21a000 rw-p 00008000 fd:01 263066 /lib/x86_64-linux-gnu/libnss_compat-2.15.so
            7f159f21a000-7f159f232000 r-xp 00000000 fd:01 263057 /lib/x86_64-linux-gnu/libresolv-2.15.so
            7f159f232000-7f159f432000 ---p 00018000 fd:01 263057 /lib/x86_64-linux-gnu/libresolv-2.15.so
            7f159f432000-7f159f433000 r--p 00018000 fd:01 263057 /lib/x86_64-linux-gnu/libresolv-2.15.so
            7f159f433000-7f159f434000 rw-p 00019000 fd:01 263057 /lib/x86_64-linux-gnu/libresolv-2.15.so
            7f159f434000-7f159f436000 rw-p 00000000 00:00 0
            7f159f436000-7f159f43d000 r-xp 00000000 fd:01 263069 /lib/x86_64-linux-gnu/libnss_dns-2.15.so
            7f159f43d000-7f159f63c000 ---p 00007000 fd:01 263069 /lib/x86_64-linux-gnu/libnss_dns-2.15.so
            7f159f63c000-7f159f63d000 r--p 00006000 fd:01 263069 /lib/x86_64-linux-gnu/libnss_dns-2.15.so
            7f159f63d000-7f159f63e000 rw-p 00007000 fd:01 263069 /lib/x86_64-linux-gnu/libnss_dns-2.15.so
            7f159f63e000-7f159f64a000 r-xp 00000000 fd:01 263063 /lib/x86_64-linux-gnu/libnss_files-2.15.so
            7f159f64a000-7f159f849000 ---p 0000c000 fd:01 263063 /lib/x86_64-linux-gnu/libnss_files-2.15.so
            7f159f849000-7f159f84a000 r--p 0000b000 fd:01 263063 /lib/x86_64-linux-gnu/libnss_files-2.15.so
            7f159f84a000-7f159f84b000 rw-p 0000c000 fd:01 263063 /lib/x86_64-linux-gnu/libnss_files-2.15.so
            7f159f84b000-7f159f84d000 r-xp 00000000 fd:01 263070 /lib/x86_64-linux-gnu/libdl-2.15.so
            7f159f84d000-7f159fa4d000 ---p 00002000 fd:01 263070 /lib/x86_64-linux-gnu/libdl-2.15.so
            7f159fa4d000-7f159fa4e000 r--p 00002000 fd:01 263070 /lib/x86_64-linux-gnu/libdl-2.15.so
            7f159fa4e000-7f159fa4f000 rw-p 00003000 fd:01 263070 /lib/x86_64-linux-gnu/libdl-2.15.so
            7f159fa4f000-7f159fa65000 r-xp 00000000 fd:01 266982 /lib/x86_64-linux-gnu/libz.so.1.2.3.4
            7f159fa65000-7f159fc64000 ---p 00016000 fd:01 266982 /lib/x86_64-linux-gnu/libz.so.1.2.3.4
            7f159fc64000-7f159fc65000 r--p 00015000 fd:01 266982 /lib/x86_64-linux-gnu/libz.so.1.2.3.4
            7f159fc65000-7f159fc66000 rw-p 00016000 fd:01 266982 /lib/x86_64-linux-gnu/libz.so.1.2.3.4
            7f159fc66000-7f159fc75000 r-xp 00000000 fd:01 262271 /lib/x86_64-linux-gnu/libbz2.so.1.0.4
            7f159fc75000-7f159fe74000 ---p 0000f000 fd:01 262271 /lib/x86_64-linux-gnu/libbz2.so.1.0.4
            7f159fe74000-7f159fe75000 r--p 0000e000 fd:01 262271 /lib/x86_64-linux-gnu/libbz2.so.1.0.4
            7f159fe75000-7f159fe76000 rw-p 0000f000 fd:01 262271 /lib/x86_64-linux-gnu/libbz2.so.1.0.4
            7f159fe76000-7f15a0029000 r-xp 00000000 fd:01 263054 /lib/x86_64-linux-gnu/libc-2.15.so
            7f15a0029000-7f15a0228000 ---p 001b3000 fd:01 263054 /lib/x86_64-linux-gnu/libc-2.15.so
            7f15a0228000-7f15a022c000 r--p 001b2000 fd:01 263054 /lib/x86_64-linux-gnu/libc-2.15.so
            7f15a022c000-7f15a022e000 rw-p 001b6000 fd:01 263054 /lib/x86_64-linux-gnu/libc-2.15.so
            7f15a022e000-7f15a0233000 rw-p 00000000 00:00 0
            7f15a0233000-7f15a024b000 r-xp 00000000 fd:01 263074 /lib/x86_64-linux-gnu/libpthread-2.15.so
            7f15a024b000-7f15a044a000 ---p 00018000 fd:01 263074 /lib/x86_64-linux-gnu/libpthread-2.15.so
            7f15a044a000-7f15a044b000 r--p 00017000 fd:01 263074 /lib/x86_64-linux-gnu/libpthread-2.15.so
            7f15a044b000-7f15a044c000 rw-p 00018000 fd:01 263074 /lib/x86_64-linux-gnu/libpthread-2.15.so
            7f15a044c000-7f15a0450000 rw-p 00000000 00:00 0
            7f15a0450000-7f15a05ef000 r-xp 00000000 fd:01 265076 /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
            7f15a05ef000-7f15a07ee000 ---p 0019f000 fd:01 265076 /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
            7f15a07ee000-7f15a0809000 r--p 0019e000 fd:01 265076 /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
            7f15a0809000-7f15a0814000 rw-p 001b9000 fd:01 265076 /lib/x86_64-linux-gnu/libcrypto.so.1.0.0
            7f15a0814000-7f15a0818000 rw-p 00000000 00:00 0
            7f15a0818000-7f15a0854000 r-xp 00000000 fd:01 263910 /lib/x86_64-linux-gnu/libpcre.so.3.12.1
            7f15a0854000-7f15a0a53000 ---p 0003c000 fd:01 263910 /lib/x86_64-linux-gnu/libpcre.so.3.12.1
            7f15a0a53000-7f15a0a54000 r--p 0003b000 fd:01 263910 /lib/x86_64-linux-gnu/libpcre.so.3.12.1
            7f15a0a54000-7f15a0a55000 rw-p 0003c000 fd:01 263910 /lib/x86_64-linux-gnu/libpcre.so.3.12.1
            7f15a0a55000-7f15a0ae5000 r-xp 00000000 fd:01 272812 /usr/lib/libtokyocabinet.so.8.27.0
            7f15a0ae5000-7f15a0ce4000 ---p 00090000 fd:01 272812 /usr/lib/libtokyocabinet.so.8.27.0
            7f15a0ce4000-7f15a0ce5000 r--p 0008f000 fd:01 272812 /usr/lib/libtokyocabinet.so.8.27.0
            7f15a0ce5000-7f15a0ce7000 rw-p 00090000 fd:01 272812 /usr/lib/libtokyocabinet.so.8.27.0
            7f15a0ce7000-7f15a0de0000 r-xp 00000000 fd:01 263053 /lib/x86_64-linux-gnu/libm-2.15.so
            7f15a0de0000-7f15a0fdf000 ---p 000f9000 fd:01 263053 /lib/x86_64-linux-gnu/libm-2.15.so
            7f15a0fdf000-7f15a0fe0000 r--p 000f8000 fd:01 263053 /lib/x86_64-linux-gnu/libm-2.15.so
            7f15a0fe0000-7f15a0fe1000 rw-p 000f9000 fd:01 263053 /lib/x86_64-linux-gnu/libm-2.15.so
            7f15a0fe1000-7f15a0fe8000 r-xp 00000000 fd:01 263060 /lib/x86_64-linux-gnu/librt-2.15.so
            7f15a0fe8000-7f15a11e7000 ---p 00007000 fd:01 263060 /lib/x86_64-linux-gnu/librt-2.15.so
            7f15a11e7000-7f15a11e8000 r--p 00006000 fd:01 263060 /lib/x86_64-linux-gnu/librt-2.15.so
            7f15a11e8000-7f15a11e9000 rw-p 00007000 fd:01 263060 /lib/x86_64-linux-gnu/librt-2.15.so
            7f15a11e9000-7f15a120b000 r-xp 00000000 fd:01 263056 /lib/x86_64-linux-gnu/ld-2.15.so
            7f15a13ff000-7f15a1405000 rw-p 00000000 00:00 0
            7f15a1406000-7f15a140b000 rw-p 00000000 00:00 0
            7f15a140b000-7f15a140c000 r--p 00022000 fd:01 263056 /lib/x86_64-linux-gnu/ld-2.15.so
            7f15a140c000-7f15a140e000 rw-p 00023000 fd:01 263056 /lib/x86_64-linux-gnu/ld-2.15.so
            7fff87e6d000-7fff87ebb000 rw-p 00000000 00:00 0 [stack]
            7fff87f02000-7fff87f03000 r-xp 00000000 00:00 0 [vdso]
            ffffffffff600000-ffffffffff601000 r-xp 00000000 00:00 0 [vsyscall]
            Aborted (core dumped)
            CFEngine was not able to get confirmation of promises from cf-promises, so going to failsafe
            </pre>

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                a10038 jimis (Dimitrios Apostolou)
                Reporter:
                ncharles Nicolas Charles
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Summary Panel