[*] Binary protection state of ifupdown_config

  
  	Full RELRO     Canary found      NX disabled  No PIE       No RPATH     No RUNPATH   No Symbols


[*] Function sprintf tear down of ifupdown_config

    ; assembly                                               | /* r2dec pseudo code output */
                                                             | /* /logs/firmware/patool_extraction/DUMP/mtdblock8_unblob_extracted/mtdblock8_extract/0-9650176.squashfs_v4_le_extract/sbin/ifupdown_config @ 0x402024 */
                                                             | #include <stdint.h>
                                                             |  
    ; (fcn) sym.echo_data_char_const__char_const_ ()         | void echo_data_char_const_char_const_ () {
                                                             |     /* echo_data(char const*, char const*) */
    0x00402024 lui gp, 2                                     |     
    0x00402028 addiu gp, gp, 0x2ffc                          |     
    0x0040202c addu gp, gp, t9                               |     gp += t9;
    0x00402030 addiu sp, sp, -0x38                           |     
    0x00402034 sw ra, 0x34(sp)                               |     *(var_34h) = ra;
    0x00402038 sw fp, 0x30(sp)                               |     *(var_30h) = fp;
    0x0040203c move fp, sp                                   |     fp = sp;
    0x00402040 sw gp, 0x10(sp)                               |     *(var_10h) = gp;
    0x00402044 sw a0, 0x1c(fp)                               |     *(arg_1ch) = a0;
    0x00402048 sw a1, 0x18(fp)                               |     *(arg_18h) = a1;
    0x0040204c lw t8, -0x7e68(gp)                            |     t8 = *((gp - 8090));
    0x00402050 lw t8, (t8)                                   |     t8 = *(t8);
    0x00402054 sw t8, 0x2c(fp)                               |     *(arg_2ch) = t8;
    0x00402058 lw a0, 0x1c(fp)                               |     a0 = *(arg_1ch);
    0x0040205c addiu a1, zero, 0x102                         |     a1 = 0x102;
    0x00402060 addiu a2, zero, 0x1a4                         |     a2 = 0x1a4;
    0x00402064 lw t8, -0x7f34(gp)                            |     t8 = sym.imp.open64;
    0x00402068 move t9, t8                                   |     t9 = t8;
    0x0040206c jalr t9                                       |     t9 ();
    0x00402070 nop                                           |     
    0x00402074 lw gp, 0x10(fp)                               |     gp = *(arg_10h);
    0x00402078 move t8, v0                                   |     t8 = v0;
    0x0040207c sw t8, 0x20(fp)                               |     *(arg_20h) = t8;
    0x00402080 lw t8, 0x20(fp)                               |     t8 = *(arg_20h);
                                                             |     if (t8 < 0) {
    0x00402084 bgez t8, 0x4020f4                             |         
    0x00402088 nop                                           |         
    0x0040208c lw t8, -0x7e64(gp)                            |         t8 = sym.imp.__errno_location;
    0x00402090 move t9, t8                                   |         t9 = t8;
    0x00402094 jalr t9                                       |         t9 ();
    0x00402098 nop                                           |         
    0x0040209c lw gp, 0x10(fp)                               |         gp = *(arg_10h);
    0x004020a0 move t8, v0                                   |         t8 = v0;
    0x004020a4 lw t8, (t8)                                   |         t8 = *(t8);
    0x004020a8 move a0, t8                                   |         a0 = t8;
    0x004020ac lw t8, -0x7f48(gp)                            |         t8 = sym.imp.strerror;
    0x004020b0 move t9, t8                                   |         t9 = t8;
    0x004020b4 jalr t9                                       |         t9 ();
    0x004020b8 nop                                           |         
    0x004020bc lw gp, 0x10(fp)                               |         gp = *(arg_10h);
    0x004020c0 move t8, v0                                   |         t8 = v0;
    0x004020c4 lw v0, -0x7fdc(gp)                            |         v0 = *((gp - 8183));
                                                             |         /* str.Open__s_fail:__s_n */
    0x004020c8 addiu a0, v0, -0x520c                         |         a0 = v0 + -0x520c;
    0x004020cc lw a1, 0x1c(fp)                               |         a1 = *(arg_1ch);
    0x004020d0 move a2, t8                                   |         a2 = t8;
    0x004020d4 lw t8, -0x7f4c(gp)                            |         t8 = sym.imp.printf;
    0x004020d8 move t9, t8                                   |         t9 = t8;
    0x004020dc jalr t9                                       |         t9 ();
    0x004020e0 nop                                           |         
    0x004020e4 lw gp, 0x10(fp)                               |         gp = *(arg_10h);
    0x004020e8 addiu t8, zero, -1                            |         t8 = -1;
    0x004020ec b 0x402364                                    |         goto label_0;
    0x004020f0 nop                                           |         
                                                             |     }
    0x004020f4 lw a0, 0x20(fp)                               |     a0 = *(arg_20h);
    0x004020f8 addiu a1, zero, 2                             |     a1 = 2;
    0x004020fc lw t8, -0x7f04(gp)                            |     t8 = sym.imp.flock;
    0x00402100 move t9, t8                                   |     t9 = t8;
    0x00402104 jalr t9                                       |     t9 ();
    0x00402108 nop                                           |     
    0x0040210c lw gp, 0x10(fp)                               |     gp = *(arg_10h);
    0x00402110 lw a0, 0x18(fp)                               |     a0 = *(arg_18h);
    0x00402114 lw t8, -0x7e94(gp)                            |     t8 = sym.imp.strlen;
    0x00402118 move t9, t8                                   |     t9 = t8;
    0x0040211c jalr t9                                       |     t9 ();
    0x00402120 nop                                           |     
    0x00402124 lw gp, 0x10(fp)                               |     gp = *(arg_10h);
    0x00402128 move t8, v0                                   |     t8 = v0;
    0x0040212c addiu t8, t8, 1                               |     t8++;
    0x00402130 move a0, t8                                   |     a0 = t8;
    0x00402134 lw t8, -0x7e80(gp)                            |     t8 = sym.imp.malloc;
    0x00402138 move t9, t8                                   |     t9 = t8;
    0x0040213c jalr t9                                       |     t9 ();
    0x00402140 nop                                           |     
    0x00402144 lw gp, 0x10(fp)                               |     gp = *(arg_10h);
    0x00402148 move t8, v0                                   |     t8 = v0;
    0x0040214c sw t8, 0x24(fp)                               |     *(arg_24h) = t8;
    0x00402150 lw t8, 0x24(fp)                               |     t8 = *(arg_24h);
                                                             |     if (t8 == 0) {
    0x00402154 bnez t8, 0x4021c0                             |         
    0x00402158 nop                                           |         
    0x0040215c lw t8, -0x7e64(gp)                            |         t8 = sym.imp.__errno_location;
    0x00402160 move t9, t8                                   |         t9 = t8;
    0x00402164 jalr t9                                       |         t9 ();
    0x00402168 nop                                           |         
    0x0040216c lw gp, 0x10(fp)                               |         gp = *(arg_10h);
    0x00402170 move t8, v0                                   |         t8 = v0;
    0x00402174 lw t8, (t8)                                   |         t8 = *(t8);
    0x00402178 move a0, t8                                   |         a0 = t8;
    0x0040217c lw t8, -0x7f48(gp)                            |         t8 = sym.imp.strerror;
    0x00402180 move t9, t8                                   |         t9 = t8;
    0x00402184 jalr t9                                       |         t9 ();
    0x00402188 nop                                           |         
    0x0040218c lw gp, 0x10(fp)                               |         gp = *(arg_10h);
    0x00402190 move t8, v0                                   |         t8 = v0;
    0x00402194 lw v0, -0x7fdc(gp)                            |         v0 = *((gp - 8183));
                                                             |         /* str.Mallocation_fail:__s_n */
    0x00402198 addiu a0, v0, -0x51f8                         |         a0 = v0 + -0x51f8;
    0x0040219c move a1, t8                                   |         a1 = t8;
    0x004021a0 lw t8, -0x7f4c(gp)                            |         t8 = sym.imp.printf;
    0x004021a4 move t9, t8                                   |         t9 = t8;
    0x004021a8 jalr t9                                       |         t9 ();
    0x004021ac nop                                           |         
    0x004021b0 lw gp, 0x10(fp)                               |         gp = *(arg_10h);
    0x004021b4 addiu t8, zero, -1                            |         t8 = -1;
    0x004021b8 b 0x402364                                    |         goto label_0;
    0x004021bc nop                                           |         
                                                             |     }
    0x004021c0 lw a0, 0x24(fp)                               |     a0 = *(arg_24h);
    0x004021c4 lw t8, -0x7fdc(gp)                            |     t8 = *((gp - 8183));
                                                             |     /* esilref: '&s
' */
    0x004021c8 addiu a1, t8, -0x51e0                         |     a1 = t8 + -0x51e0;
    0x004021cc lw a2, 0x18(fp)                               |     a2 = *(arg_18h);
    0x004021d0 lw t8, -0x7f14(gp)                            |     t8 = sym.imp.sprintf
    0x004021d4 move t9, t8                                   |     t9 = t8;
    0x004021d8 jalr t9                                       |     t9 ();
    0x004021dc nop                                           |     
    0x004021e0 lw gp, 0x10(fp)                               |     gp = *(arg_10h);
    0x004021e4 lw a0, 0x18(fp)                               |     a0 = *(arg_18h);
    0x004021e8 lw t8, -0x7e94(gp)                            |     t8 = sym.imp.strlen;
    0x004021ec move t9, t8                                   |     t9 = t8;
    0x004021f0 jalr t9                                       |     t9 ();
    0x004021f4 nop                                           |     
    0x004021f8 lw gp, 0x10(fp)                               |     gp = *(arg_10h);
    0x004021fc move t8, v0                                   |     t8 = v0;
    0x00402200 addiu t8, t8, 1                               |     t8++;
    0x00402204 lw a0, 0x20(fp)                               |     a0 = *(arg_20h);
    0x00402208 lw a1, 0x24(fp)                               |     a1 = *(arg_24h);
    0x0040220c move a2, t8                                   |     a2 = t8;
    0x00402210 lw t8, -0x7edc(gp)                            |     t8 = sym.imp.write;
    0x00402214 move t9, t8                                   |     t9 = t8;
    0x00402218 jalr t9                                       |     t9 ();
    0x0040221c nop                                           |     
    0x00402220 lw gp, 0x10(fp)                               |     gp = *(arg_10h);
    0x00402224 lw a0, 0x20(fp)                               |     a0 = *(arg_20h);
    0x00402228 addiu a1, zero, 8                             |     a1 = 8;
    0x0040222c lw t8, -0x7f04(gp)                            |     t8 = sym.imp.flock;
    0x00402230 move t9, t8                                   |     t9 = t8;
    0x00402234 jalr t9                                       |     t9 ();
    0x00402238 nop                                           |     
    0x0040223c lw gp, 0x10(fp)                               |     gp = *(arg_10h);
    0x00402240 lw a0, 0x20(fp)                               |     a0 = *(arg_20h);
    0x00402244 lw t8, -0x7eec(gp)                            |     t8 = sym.imp.close;
    0x00402248 move t9, t8                                   |     t9 = t8;
    0x0040224c jalr t9                                       |     t9 ();
    0x00402250 nop                                           |     
    0x00402254 lw gp, 0x10(fp)                               |     gp = *(arg_10h);
    0x00402258 lw a0, 0x24(fp)                               |     a0 = *(arg_24h);
    0x0040225c lw t8, -0x7f40(gp)                            |     t8 = sym.imp.free;
    0x00402260 move t9, t8                                   |     t9 = t8;
    0x00402264 jalr t9                                       |     t9 ();
    0x00402268 nop                                           |     
    0x0040226c lw gp, 0x10(fp)                               |     gp = *(arg_10h);
    0x00402270 lw t8, -0x7fd0(gp)                            |     t8 = *((gp - 8180));
    0x00402274 lw v0, -0x2a3c(t8)                            |     v0 = *((t8 - 2703));
    0x00402278 addiu t8, zero, 1                             |     t8 = 1;
                                                             |     if (v0 == t8) {
    0x0040227c bne v0, t8, 0x402360                          |         
    0x00402280 nop                                           |         
    0x00402284 lw t8, -0x7fdc(gp)                            |         t8 = *((gp - 8183));
                                                             |         /* str._dev_console */
    0x00402288 addiu a0, t8, -0x51dc                         |         a0 = t8 + -0x51dc;
    0x0040228c lw t8, -0x7fdc(gp)                            |         t8 = *((gp - 8183));
                                                             |         /* esilref: 'w+' */
    0x00402290 addiu a1, t8, -0x51cc                         |         a1 = t8 + -0x51cc;
    0x00402294 lw t8, -0x7e90(gp)                            |         t8 = sym.imp.fopen64;
    0x00402298 move t9, t8                                   |         t9 = t8;
    0x0040229c jalr t9                                       |         t9 ();
    0x004022a0 nop                                           |         
    0x004022a4 lw gp, 0x10(fp)                               |         gp = *(arg_10h);
    0x004022a8 move t8, v0                                   |         t8 = v0;
    0x004022ac sw t8, 0x28(fp)                               |         *(arg_28h) = t8;
    0x004022b0 lw t8, 0x28(fp)                               |         t8 = *(arg_28h);
                                                             |         if (t8 == 0) {
    0x004022b4 bnez t8, 0x402320                             |             
    0x004022b8 nop                                           |             
    0x004022bc lw t8, -0x7e64(gp)                            |             t8 = sym.imp.__errno_location;
    0x004022c0 move t9, t8                                   |             t9 = t8;
    0x004022c4 jalr t9                                       |             t9 ();
    0x004022c8 nop                                           |             
    0x004022cc lw gp, 0x10(fp)                               |             gp = *(arg_10h);
    0x004022d0 move t8, v0                                   |             t8 = v0;
    0x004022d4 lw t8, (t8)                                   |             t8 = *(t8);
    0x004022d8 move a0, t8                                   |             a0 = t8;
    0x004022dc lw t8, -0x7f48(gp)                            |             t8 = sym.imp.strerror;
    0x004022e0 move t9, t8                                   |             t9 = t8;
    0x004022e4 jalr t9                                       |             t9 ();
    0x004022e8 nop                                           |             
    0x004022ec lw gp, 0x10(fp)                               |             gp = *(arg_10h);
    0x004022f0 move t8, v0                                   |             t8 = v0;
    0x004022f4 lw v0, -0x7fdc(gp)                            |             v0 = *((gp - 8183));
                                                             |             /* str.Open__dev_console_fail:__s_n */
    0x004022f8 addiu a0, v0, -0x51c8                         |             a0 = v0 + -0x51c8;
    0x004022fc move a1, t8                                   |             a1 = t8;
    0x00402300 lw t8, -0x7f4c(gp)                            |             t8 = sym.imp.printf;
    0x00402304 move t9, t8                                   |             t9 = t8;
    0x00402308 jalr t9                                       |             t9 ();
    0x0040230c nop                                           |             
    0x00402310 lw gp, 0x10(fp)                               |             gp = *(arg_10h);
    0x00402314 addiu t8, zero, -1                            |             t8 = -1;
    0x00402318 b 0x402364                                    |             goto label_0;
    0x0040231c nop                                           |             
                                                             |         }
    0x00402320 lw a0, 0x28(fp)                               |         a0 = *(arg_28h);
    0x00402324 lw t8, -0x7fdc(gp)                            |         t8 = *((gp - 8183));
                                                             |         /* str.e_1_31m_echo__s_in__s_e_0m_n */
    0x00402328 addiu a1, t8, -0x51ac                         |         a1 = t8 + -0x51ac;
    0x0040232c lw a2, 0x18(fp)                               |         a2 = *(arg_18h);
    0x00402330 lw a3, 0x1c(fp)                               |         a3 = *(arg_1ch);
    0x00402334 lw t8, -0x7f0c(gp)                            |         t8 = sym.imp.fprintf;
    0x00402338 move t9, t8                                   |         t9 = t8;
    0x0040233c jalr t9                                       |         t9 ();
    0x00402340 nop                                           |         
    0x00402344 lw gp, 0x10(fp)                               |         gp = *(arg_10h);
    0x00402348 lw a0, 0x28(fp)                               |         a0 = *(arg_28h);
    0x0040234c lw t8, -0x7ec4(gp)                            |         t8 = sym.imp.fclose;
    0x00402350 move t9, t8                                   |         t9 = t8;
    0x00402354 jalr t9                                       |         t9 ();
    0x00402358 nop                                           |         
    0x0040235c lw gp, 0x10(fp)                               |         gp = *(arg_10h);
                                                             |     }
    0x00402360 move t8, zero                                 |     t8 = 0;
                                                             | label_0:
    0x00402364 move v0, t8                                   |     v0 = t8;
    0x00402368 lw t8, -0x7e68(gp)                            |     t8 = *((gp - 8090));
    0x0040236c lw v1, 0x2c(fp)                               |     v1 = *(arg_2ch);
    0x00402370 lw t8, (t8)                                   |     t8 = *(t8);
                                                             |     if (v1 != t8) {
    0x00402374 beq v1, t8, 0x40238c                          |         
    0x00402378 nop                                           |         
    0x0040237c lw t8, -0x7ecc(gp)                            |         t8 = sym.imp.__stack_chk_fail;
    0x00402380 move t9, t8                                   |         t9 = t8;
    0x00402384 jalr t9                                       |         t9 ();
    0x00402388 nop                                           |         
                                                             |     }
    0x0040238c move sp, fp                                   |     
    0x00402390 lw ra, 0x34(sp)                               |     ra = *(var_34h);
    0x00402394 lw fp, 0x30(sp)                               |     fp = *(var_30h);
    0x00402398 addiu sp, sp, 0x38                            |     
    0x0040239c jr ra                                         |     return v1;
    0x004023a0 nop                                           |     
                                                             | }

[*] Function sprintf used 2 times ifupdown_config