Summary: | dev-lang/R: double to long int casts overflows gc variable in memory.c | ||||||
---|---|---|---|---|---|---|---|
Product: | Gentoo Security | Reporter: | gto7052 | ||||
Component: | Vulnerabilities | Assignee: | Gentoo Security <security> | ||||
Status: | UNCONFIRMED --- | ||||||
Severity: | normal | CC: | ajak, gto7052, sci-mathematics | ||||
Priority: | Normal | ||||||
Version: | unspecified | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | ?? [upstream] | ||||||
Package list: | Runtime testing required: | --- | |||||
Attachments: |
|
Description
gto7052
2024-11-12 22:32:54 UTC
Did you report this bug upstream with R? There is not much we can here from our (distribution) perspective. Created attachment 908767 [details]
gdb log when breaking at AdjustHeapSize(.)
(In reply to Hans de Graaff from comment #1) > Did you report this bug upstream with R? There is not much we can here from > our (distribution) perspective. I just lost my reply to you as I tried to attach the gdb log file. In short: -The R-maintainers disallowed to create new accounts by ordinary users some time ago. - The reason for the overflow condition is that the assumption of a linear growth (line 1200) does not hold, because the garbage collector may also shrink the allocated memory pool between two subsequent calls to AdjustHeapSize(.) and reflect situation that by setting R_NodesInUse to a smaller value than that one stored in the local static variable `last_in_use`. Because both variables are unsigned, this in turn may lead to a huge value for the difference `R_NodesInUse - last_in_use`, only to be noticed by UBSAN when the (implicit) integer cast from a double expression occurs in line 1204. As the attached debug log shows, all that leads to an absurdly wrong R_NSize of 2^63, which is the size of what R calls the "language heap". > -The R-maintainers disallowed to create new accounts by ordinary users some time ago. So.. still not really much we can do from the distribution's perspective. There seems to be instructions on getting an account on their Bugzilla here, though: https://www.r-project.org/bugs.html |