Rocky Linux has a bug in initializing Docker (pwn challenge).

[root]# cat /etc/redhat-release
Rocky Linux release 9.3 (Blue Onyx)

A pwn challenge, compiled into a docker using ctf.xinetd. A ready-made framework: GitHub - TaQini/pwn_docker: Easy deploy pwn challenge on CTFd with plugins CTFd-Whale

After loading the docker, some libs were found not running:

[root]# docker exec -it 8a9395b0a546 /bin/sh

/etc/init.d/xinetd status

  • is not running

However, the same docker, when placed on CentOS 7.9, works perfectly fine.

What’s more strange is that yesterday there were issues during testing, but today it’s working fine, and after a restart, it’s not working again.

Today’s test is normal:
[root]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
002bb1fd1d1f chat:latest “/start.sh” 14 hours ago Up 14 hours 127.0.0.1:10068->9999/tcp chat4
fa61e800a178 ctf64:latest “/start.sh” 17 hours ago Up 17 hours 127.0.0.1:10063->9999/tcp ctf64
3097ae0258e4 kxpwn:latest “/start.sh” 19 hours ago Up 19 hours 127.0.0.1:10061->9999/tcp kxpwn

[root]# docker exec -it 3097ae0258e4 /bin/sh

/etc/init.d/xinetd status

  • is running
    INTERNAL STATE DUMP: xinetd Version 2.3.15
    Current time: Tue Apr 16 02:51:26 2024

Services + defaults:
Service defaults
Bind = All addresses.
Only from: All sites
No access: No blocked sites
No logging
Server table dump:

Retry table dump:

Socket mask: 3
mask_max = 4

exit;

After restarting the system, it’s not working again (without any operations in between):
[root]# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
8a9395b0a546 ctf64:latest “/start.sh” 2 seconds ago Up 1 second 127.0.0.1:10058->9999/tcp ctf645

[root]# docker exec -it 8a9395b0a546 /bin/sh

/etc/init.d/xinetd status

  • is not running

The pwn image is definitely not the issue, as multiple pwn images for CTF competitions have been tested with the same behavior. Rocky Linux release 9.3 has also been reinstalled, but the issue persists.