RPC: svc_register() authentication error; why = client credential too weak

Bug #1254201 reported by Scott Duckworth
12
This bug affects 2 people
Affects Status Importance Assigned to Milestone
eglibc (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Simple RPC programs will not work without running rpcbind in insecure mode (rpcbind -i). The error that is given when running the RPC server is:

Cannot register service: RPC: Authentication error; why = Client credential too weak
unable to register (SIMP_PROG, SIMP_VERSION, udp).

strace shows where the problem happens:

socket(PF_INET, SOCK_DGRAM|SOCK_NONBLOCK, IPPROTO_UDP) = 4
bind(4, {sa_family=AF_INET, sin_port=htons(861), sin_addr=inet_addr("0.0.0.0")}, 16) = -1 EACCES (Permission denied)
setsockopt(4, SOL_IP, IP_RECVERR, [1], 4) = 0
sendto(4, "h_\202\356\0\0\0\0\0\0\0\2\0\1\206\240\0\0\0\2\0\0\0\1\0\0\0\0\0\0\0\0"..., 56, 0, {sa_family=AF_INET, sin_port=htons(111), sin_addr=inet_addr("127.0.0.1")}, 16) = 56
poll([{fd=4, events=POLLIN}], 1, 5000) = 1 ([{fd=4, revents=POLLIN}])
recvfrom(4, "h_\202\356\0\0\0\1\0\0\0\1\0\0\0\1\0\0\0\5", 400, MSG_DONTWAIT, {sa_family=AF_INET, sin_port=htons(111), sin_addr=inet_addr("127.0.0.1")}, [16]) = 20
write(2, "Cannot register service: RPC: Au"..., 85Cannot register service: RPC: Authentication error; why = Client credential too weak
) = 85
close(4) = 0
write(2, "unable to register (SIMP_PROG, S"..., 50unable to register (SIMP_PROG, SIMP_VERSION, udp).) = 50
exit_group(1) = ?

The same program works fine on CentOS 5 and CentOS 6. strace on the same program on CentOS 6 (libc 2.12) shows a different behavior:

socket(PF_INET, SOCK_DGRAM|SOCK_NONBLOCK, IPPROTO_UDP) = 4
bind(4, {sa_family=AF_INET, sin_port=htons(613), sin_addr=inet_addr("0.0.0.0")}, 16) = -1 EACCES (Permission denied)
setsockopt(4, SOL_IP, IP_RECVERR, [1], 4) = 0
sendto(4, "\f\330A\n\0\0\0\0\0\0\0\2\0\1\206\240\0\0\0\2\0\0\0\1\0\0\0\0\0\0\0\0"..., 56, 0, {sa_family=AF_INET, sin_port=htons(111), sin_addr=inet_addr("127.0.0.1")}, 16) = 56
poll([{fd=4, events=POLLIN}], 1, 5000) = 1 ([{fd=4, revents=POLLIN}])
recvfrom(4, "\f\330A\n\0\0\0\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1", 400, MSG_DONTWAIT, {sa_family=AF_INET, sin_port=htons(111), sin_addr=inet_addr("127.0.0.1")}, [16]) = 28
close(4) = 0
socket(PF_INET, SOCK_STREAM, IPPROTO_TCP) = 4
bind(4, {sa_family=AF_INET, sin_port=htons(614), sin_addr=inet_addr("0.0.0.0")}, 16) = -1 EACCES (Permission denied)
bind(4, {sa_family=AF_INET, sin_port=htons(0), sin_addr=inet_addr("0.0.0.0")}, 16) = 0
getsockname(4, {sa_family=AF_INET, sin_port=htons(41111), sin_addr=inet_addr("0.0.0.0")}, [16]) = 0
listen(4, 128) = 0
... (the program keeps running as expected) ...

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: libc6 2.15-0ubuntu10.5
ProcVersionSignature: Ubuntu 3.2.0-56.86-generic 3.2.51
Uname: Linux 3.2.0-56-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.0.1-0ubuntu17.6
Architecture: amd64
Date: Fri Nov 22 17:27:24 2013
MarkForUpload: True
ProcEnviron:
 SHELL=/bin/bash
 TERM=xterm
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 LANGUAGE=en_US:
SourcePackage: eglibc
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Scott Duckworth (scott-duckworth) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in eglibc (Ubuntu):
status: New → Confirmed
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.