Issue 8989 - Undefined Behavior in id2entry.c
Summary: Undefined Behavior in id2entry.c
Status: VERIFIED FIXED
Alias: None
Product: OpenLDAP
Classification: Unclassified
Component: slapd (show other issues)
Version: 2.4.47
Hardware: All All
: --- normal
Target Milestone: ---
Assignee: OpenLDAP project
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-03-07 10:16 UTC by noloader@gmail.com
Modified: 2019-07-24 19:04 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description noloader@gmail.com 2019-03-07 10:16:24 UTC
Full_Name: JW
Version: 2.4.47
OS: Linux (Fedora 29, x86_64, fully patched)
URL: ftp://ftp.openldap.org/incoming/
Submission from: (NULL) (151.196.22.177)


CFLAGS includes -fsanitize=undefined. These can be cleared with 1U << 31.

id2entry.c:622:9: runtime error: left shift of 1 by 31 places cannot be
represented in type 'int'
id2entry.c:691:11: runtime error: left shift of 1 by 31 places cannot be
represented in type 'int'
id2entry.c:708:22: runtime error: left shift of 1 by 31 places cannot be
represented in type 'int'
id2entry.c:709:20: runtime error: left shift of 1 by 31 places cannot be
represented in type 'int'
Comment 1 Howard Chu 2019-03-10 14:26:39 UTC
noloader@gmail.com wrote:
> Full_Name: JW
> Version: 2.4.47
> OS: Linux (Fedora 29, x86_64, fully patched)
> URL: ftp://ftp.openldap.org/incoming/
> Submission from: (NULL) (151.196.22.177)
> 
> 
> CFLAGS includes -fsanitize=undefined. These can be cleared with 1U << 31.
> 
> id2entry.c:622:9: runtime error: left shift of 1 by 31 places cannot be
> represented in type 'int'
> id2entry.c:691:11: runtime error: left shift of 1 by 31 places cannot be
> represented in type 'int'
> id2entry.c:708:22: runtime error: left shift of 1 by 31 places cannot be
> represented in type 'int'
> id2entry.c:709:20: runtime error: left shift of 1 by 31 places cannot be
> represented in type 'int'

Fixed in git


-- 
  -- Howard Chu
  CTO, Symas Corp.           http://www.symas.com
  Director, Highland Sun     http://highlandsun.com/hyc/
  Chief Architect, OpenLDAP  http://www.openldap.org/project/

Comment 2 Howard Chu 2019-03-10 14:49:10 UTC
changed notes
changed state Open to Test
moved from Incoming to Software Bugs
Comment 3 Quanah Gibson-Mount 2019-03-11 18:55:03 UTC
changed notes
changed state Test to Release
Comment 4 OpenLDAP project 2019-07-24 19:04:52 UTC
fixed in master
fixed in RE24 (2.4.48)
Comment 5 Quanah Gibson-Mount 2019-07-24 19:04:52 UTC
changed notes
changed state Release to Closed