Bug 1502 - Incompatible declaration of AuthctxtV2.success
Summary: Incompatible declaration of AuthctxtV2.success
Status: CLOSED FIXED
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: ssh (show other bugs)
Version: 5.0p1
Hardware: Other Other
: P2 normal
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks: V_5_6
  Show dependency treegraph
 
Reported: 2008-08-12 02:44 AEST by Tom Hanson
Modified: 2011-01-24 12:33 AEDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Hanson 2008-08-12 02:44:03 AEST
Source file sshconnect2.c contains the definition of structure AuthctxtV2.  Field "success" in this structure is declared as type "int".  

In function ssh_userauth2(), authctxt.success is passed to dispatch_run() as the second argument.  

dispatch_run() is declared in dispatch.c with a second parameter of type sig_atomic_t.

On some OS's (i.e. VxWorks) "sig_atomic_t" is declared as "unsigned char".  Where the system is also big-endian, the size mismatch between "sig_atomic_t" as "unsigned char" and "authctxt.success" as "int" causes the data to be written to / read from different bytes.
Comment 1 Tom Hanson 2008-08-12 02:44:39 AEST
Source file sshconnect2.c contains the definition of structure AuthctxtV2.  Field "success" in this structure is declared as type "int".  

In function ssh_userauth2(), authctxt.success is passed to dispatch_run() as the second argument.  

dispatch_run() is declared in dispatch.c with a second parameter of type sig_atomic_t.

On some OS's (i.e. VxWorks) "sig_atomic_t" is declared as "unsigned char".  Where the system is also big-endian, the size mismatch between "sig_atomic_t" as "unsigned char" and "authctxt.success" as "int" causes the data to be written to / read from different bytes.  Specifically, the result written by dispatch_run() is not seen b
Comment 2 Tom Hanson 2008-08-12 02:45:05 AEST
Source file sshconnect2.c contains the definition of structure AuthctxtV2.  Field "success" in this structure is declared as type "int".  

In function ssh_userauth2(), authctxt.success is passed to dispatch_run() as the second argument.  

dispatch_run() is declared in dispatch.c with a second parameter of type sig_atomic_t.

On some OS's (i.e. VxWorks) "sig_atomic_t" is declared as "unsigned char".  Where the system is also big-endian, the size mismatch between "sig_atomic_t" as "unsigned char" and "authctxt.success" as "int" causes the data to be written to / read from different bytes.
Comment 3 Damien Miller 2010-04-27 08:36:54 AEST
Fixed in CVS. Will be in openssh-5.6 -thanks!
Comment 4 Damien Miller 2011-01-24 12:33:34 AEDT
Move resolved bugs to CLOSED after 5.7 release