rwall adds \377 bytes to short messages

Bug #1277981 reported by Chris Good
6
This bug affects 1 person
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\377\377\3771

# 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://au.archive.ubuntu.com/ubuntu/ precise/universe amd64 Packages
        100 /var/lib/dpkg/status

Chris Good (chris-good)
tags: added: rwall
tags: added: netkit-rwall
Revision history for this message
Chris Good (chris-good) wrote :

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...

Revision history for this message
Chris Good (chris-good) wrote :

While the problem doesn't show on trusty, I still think it is a bug that should be fixed.
I've pushed my fix branch to :
https://code.launchpad.net/~chris-good/ubuntu/trusty/netkit-rwall/fix-for-1277981
and proposed a merge.
The trusty ppa is :
https://launchpad.net/~chris-good/+archive/rwall-ppa

Revision history for this message
Chris Good (chris-good) wrote :

debdiff

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "netkit-rwall-1277981.debdiff" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
tags: added: precise
Revision history for this message
Robie Basak (racb) wrote :

Unsubscribing sponsors since I see that https://code.launchpad.net/~chris-good/ubuntu/trusty/netkit-rwall/fix-for-1277981/+merge/216563 already exists, and so this is causing this request to be in the sponsorship queue twice.

Revision history for this message
Steve Langasek (vorlon) wrote :

The Precise Pangolin has reached end of life, so this bug will not be fixed for that release

Changed in netkit-rwall (Ubuntu Precise):
status: New → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.