Package: openafs-krb5
Severity: normal
Hi,
found while using aklog, so reporting against -krb5...
=> src/auth/cellconfig.c:
] int
] afsconf_GetAfsdbInfo(char *acellName, char *aservice,
] struct afsconf_cell *acellInfo)
] {
] [...]
] code = afsconf_LookupServer((const char *)service, "udp",
] (const char *)acellName, afsdbport,
] cellHostAddrs, cellHostNames,
] ports, ipRanks, &numServers, &ttl,
] &realCellName);
] [...]
] acellInfo->hostAddr[i].sin_port = ports[i];
] int
] afsconf_LookupServer(const char *service, const char *protocol,
] const char *cellName, unsigned short afsdbPort,
] int *cellHostAddrs, char cellHostNames[][MAXHOSTCHARS],
] unsigned short ports[], unsigned short ipRanks[],
] int *numServers, int *ttl, char **arealCellName)
] {
] [...]
/* p[] is a byte pointer into the DNS answer to a type SRV query
and points into the contents of the SRV RR right at the priority,
so the dest port is at (p+4) */
] ports[server_num] = (p[4] << 8) | p[5];
So ports[] is manually extracted from the DNS answer and thus implicitely
converted from network to host byte order, but not converted back when
assigning the (struct sin_addr).sin_port member.
Suggestion: Wrap either assignment with htons().
Regards,
Jan
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]