rwall adds \377 bytes to short messages
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
netkit-rwall (Ubuntu) |
New
|
Undecided
|
Unassigned | ||
Precise |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
When sending from and receiving to Ubuntu 12.04.4 LTS :
Extra \377 bytes and a trailing '1' are included in the received message, when it is less than 11 characters long.
# echo 12345 | rwall HostName
Result:
12345
\377\377\
# echo 123456 | rwall HostName
Result:
123456
\377\377\377\3771
# echo 1234567 | rwall HostName
Result:
1234567
\377\377\3771
# echo 12345678 | rwall HostName
Result:
12345678
\377\3771
# echo 123456789 | rwall HostName
Result:
123456789
\3771
# echo 1234567890 | rwall HostName
Result:
1234567890
1
# echo 1234567890A | rwall HostName
Result:
1234567890A
(No extra characters for messages >= 11 chars long)
Source: netkit-rwall
Version: 0.17-7
# lsb_release -rd
Description: Ubuntu 12.04.4 LTS
Release: 12.04
# apt-cache policy rwall
rwall:
Installed: 0.17-7
Candidate: 0.17-7
Version table:
*** 0.17-7 0
500 http://
100 /var/lib/
tags: | added: rwall |
tags: | added: netkit-rwall |
tags: | added: precise |
I've worked out a patch to rwall.c which null terminates mbuf before it is passed to clnt_create().
This fixes the problem in precise (12.04.4).
However, when I test in trusty (14.04 Beta2), the problem does not exist in the original rwall & rpc.rwalld, even though rwall & rpc.rwalld are the same package version (0.17-7) and rwall & rpc.rwalld have the same 'sum -r' as precise.
Darn, I assumed that because they were the same, the problem needed to be fixed.
I wonder what else has changed that fixed the problem...