03-07-2024 06:32 PM
Hey everyone, having issues with the successful use of .tbc (precompiled .tcl files via procomp). I have used this previously on some older IOS codes without issue, and looking at the system management guides it looks to be supported. However when attempting to run the .tbc file - IOS returns the following error:
The TclPro ByteCode Loader is not available or does not support the correct version
while executing
"error "The TclPro ByteCode Loader is not available or does not support the correct version""
invoked from within
"if {[catch {package require tbcload 1.3} err] == 1} {
error "The TclPro ByteCode Loader is not available or does not support the correct version"
..."
I'm starting to think that the version of IOS XE doesn't support ByteCode Loader at all..... Tried commenting out the if check at the tope of this code.... still errored out, but instead errored out on the next command to be called... which is:
" tbcload::bceval {
TclPro ByteCode 1 0 1.3 8.3
36 0 382 64 0 0 320 0 16 36 36 -1 -1
382......(rest of compiled code follows)
@Joe Clarke - I've interfaced with you in the past on some of this - any insight?
Open to insight from anyone else.
03-08-2024 04:09 AM
- FYI : https://bst.cloudapps.cisco.com/bugsearch/bug/CSCdw77138
M.
03-08-2024 05:14 AM
M,
Not trying to be argumentative here, but I don't see the relationship between the topic in your link, and specifically the described workaround:
"Make sure these two lines are not commented out in MGC_Tookit. TCL_LIBRARY=${TCL_DIR}/lib/tcl8.3 TK_LIBRARY=${TCL_DIR}/lib/tk8.3"
I'm not aware of an "MGC_Tookit" within Cisco IOS XE, and I'm using TCLPro (Procomp) to compile the .tcl files into .tbc
Can you expound upon your response?
03-08-2024 05:24 AM
Update....
I did find a way to display the packages within TCL on Cisco IOS... with command:
ROUTER#tclsh
ROUTER#(tcl) package names
udp Tcl
.....other reference documents show that the output of this command should include "tbcload"
Has tbcload been removed from this IOS XE product chain? and if so can it be re-added?
Ultimately - is there a way to protect the .tcl code through obfuscation?
06-03-2024 08:30 AM
We dropped support for bytecode loading (TBC files) because of CSCvq05584 Cisco IOS and IOS XE Software Tcl Arbitrary Code Execution Vulnerability.
Out of curiosity, why do you require obfuscation?
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide