Yubico Forum

...visit our web-store at store.yubico.com
It is currently Tue Jan 30, 2018 11:56 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 14 posts ]  Go to page Previous  1, 2
Author Message
PostPosted: Thu Mar 12, 2009 7:11 am 
Offline

Joined: Thu Mar 12, 2009 6:34 am
Posts: 2
Nice, good find!

I can see what you're talking about:

Code:
  token_otp_with_password = (char *) password;
  password_len = strlen (token_otp_with_password);

  /* Getting Token value and SSH password */
  [color=#FF0000]strncpy[/color] ((char *) token_otp,
      token_otp_with_password + (password_len - TOKEN_LEN), TOKEN_LEN);


Might this also cause possible security issues? Not sure if this is really exploitable, but since it's in login code, I'm kinda wary.


Top
 Profile  
Reply with quote  

Share On:

Share on Facebook FacebookShare on Twitter TwitterShare on Tumblr TumblrShare on Google+ Google+

PostPosted: Thu Mar 12, 2009 12:32 pm 
Offline
User avatar

Joined: Wed Feb 04, 2009 2:08 am
Posts: 16
I uploaded a patch to the pam_yubico google page that should fix most of the things I was having issues with. It now checks the password to make sure its long enough to contain an OTP before it splits it. It also allows users that don't have a yubikey id associated with them to login. This patch also includes the 64-bit patch above. Feedback is appreciated.

Issue report -> http://code.google.com/p/yubico-pam/issues/detail?id=12
Direct link -> http://yubico-pam.googlecode.com/issues/attachment?aid=5317245680863813985&name=pam_yubico-1.11updates2.patch

_________________
richard


Top
 Profile  
Reply with quote  
PostPosted: Tue Mar 24, 2009 2:41 pm 
Offline
Site Admin
Site Admin

Joined: Tue May 06, 2008 7:22 pm
Posts: 151
cmoates wrote:
Here's a diff which I believe fixes the problem. I've tested it on Ubuntu 8.10 64 bit as well as Ubuntu 8.10 32 bit. Anyone else care to try it out?


Hi! I applied a slightly different patch, see:

http://code.google.com/p/yubico-pam/sou ... ail?r=141#

Please check it. I'll likely do another 1.13 release with this later today.

/Simon


Top
 Profile  
Reply with quote  
PostPosted: Tue Mar 24, 2009 3:01 pm 
Offline
User avatar

Joined: Wed Feb 04, 2009 2:08 am
Posts: 16
Hmm... You may want to malloc an integer to store the retval before setting with pam_set_data. The current scope of retval will get recollected when that function returns. When the data is retrieved that location is probably is use by something else or it could segfault. We should malloc a dynamic memory location and recollect with a 'cleanup' function.

_________________
richard


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 14 posts ]  Go to page Previous  1, 2

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group