-fsanitize=bounds detects a buffer overflow in LatinIME #170

Closed
amilopowers opened this Issue Feb 8, 2016 · 23 comments

Comments

Projects
None yet
5 participants
@amilopowers

The keyboard crashes always. I am on the hammerhead nightly from the 7. Feb.2016.

I am now using another keyboard instead which could compromise my privacy.

@thestinger thestinger added the Type: bug label Feb 8, 2016

@thestinger

This comment has been minimized.

Show comment Hide comment
@thestinger

thestinger Feb 8, 2016

Contributor

Going to need log files from the crashes and instructions on how to reproduce the problem in order to do something about it. It works fine here.

Contributor

thestinger commented Feb 8, 2016

Going to need log files from the crashes and instructions on how to reproduce the problem in order to do something about it. It works fine here.

@thestinger thestinger added this to the Release milestone Feb 8, 2016

@thestinger

This comment has been minimized.

Show comment Hide comment
@thestinger

thestinger Feb 8, 2016

Contributor

Which locale are you using?

Contributor

thestinger commented Feb 8, 2016

Which locale are you using?

@amilopowers

This comment has been minimized.

Show comment Hide comment
@amilopowers

amilopowers Feb 8, 2016

I use German (Switzerland).

How do I save logs without superuser rights? I tried "aLogcat" app but didn't get any result.

I use German (Switzerland).

How do I save logs without superuser rights? I tried "aLogcat" app but didn't get any result.

@polyzen

This comment has been minimized.

Show comment Hide comment
@polyzen

polyzen Feb 8, 2016

https://developer.android.com/tools/help/logcat.html

Edit: Android doesn't need to be rooted for this

polyzen commented Feb 8, 2016

https://developer.android.com/tools/help/logcat.html

Edit: Android doesn't need to be rooted for this

@thestinger

This comment has been minimized.

Show comment Hide comment
@thestinger

thestinger Feb 8, 2016

Contributor

@amilopowers It would also be helpful if you could temporarily try the United States locale to see if this is something specific to code paths that are only hit (at least typically) in other locales.

Contributor

thestinger commented Feb 8, 2016

@amilopowers It would also be helpful if you could temporarily try the United States locale to see if this is something specific to code paths that are only hit (at least typically) in other locales.

@amilopowers

This comment has been minimized.

Show comment Hide comment
@amilopowers

amilopowers Feb 10, 2016

It happens not on a regular basis so I couldn't log it yet.

It happens not on a regular basis so I couldn't log it yet.

@Bmme2GFTbU

This comment has been minimized.

Show comment Hide comment
@Bmme2GFTbU

Bmme2GFTbU Feb 10, 2016

Could confirm this bug for German (Germany) .

Could confirm this bug for German (Germany) .

@thestinger

This comment has been minimized.

Show comment Hide comment
@thestinger

thestinger Feb 10, 2016

Contributor

Need the adb logcat output showing the crash log after it happens to approach this. It's probably a memory corruption bug in Android being detected by a CopperheadOS feature.

Contributor

thestinger commented Feb 10, 2016

Need the adb logcat output showing the crash log after it happens to approach this. It's probably a memory corruption bug in Android being detected by a CopperheadOS feature.

@Bmme2GFTbU

This comment has been minimized.

Show comment Hide comment
@Bmme2GFTbU

Bmme2GFTbU Feb 10, 2016

Seems to be related to spellchecking. After disabling keyboard works better. Problem occurs after latest update. Keyboard crashes and with spell checking you have to mark the last word to activate the keyboard again. Without spell checking it crashes less and its easier to reactivate.

Seems to be related to spellchecking. After disabling keyboard works better. Problem occurs after latest update. Keyboard crashes and with spell checking you have to mark the last word to activate the keyboard again. Without spell checking it crashes less and its easier to reactivate.

@Bmme2GFTbU

This comment has been minimized.

Show comment Hide comment
@Bmme2GFTbU

Bmme2GFTbU Feb 10, 2016

I'll try to get logcat tomorrow evening CET

I'll try to get logcat tomorrow evening CET

@thestinger

This comment has been minimized.

Show comment Hide comment
@thestinger

thestinger Feb 10, 2016

Contributor

It's probably another out-of-bounds access detected by -fsanitize=bounds the logs are just going to how a SIGTRAP triggered somewhere. It probably can't be fixed without getting the sanitize debugging mode working properly. It could be turned off for LatinIME again...

Contributor

thestinger commented Feb 10, 2016

It's probably another out-of-bounds access detected by -fsanitize=bounds the logs are just going to how a SIGTRAP triggered somewhere. It probably can't be fixed without getting the sanitize debugging mode working properly. It could be turned off for LatinIME again...

@vanitasvitae

This comment has been minimized.

Show comment Hide comment
@vanitasvitae

vanitasvitae Feb 10, 2016

I can confirm this too (german layout). Also I recognized that the keyboard starts to lag when I'm typing longer words.

I can confirm this too (german layout). Also I recognized that the keyboard starts to lag when I'm typing longer words.

@thestinger

This comment has been minimized.

Show comment Hide comment
@thestinger

thestinger Feb 11, 2016

Contributor

I can probably have this fixed in today's builds if someone can get a traceback from adb logcat after the crash.

Contributor

thestinger commented Feb 11, 2016

I can probably have this fixed in today's builds if someone can get a traceback from adb logcat after the crash.

@vanitasvitae

This comment has been minimized.

Show comment Hide comment
@vanitasvitae

vanitasvitae Feb 11, 2016

Btw: Do you plan to offer a "vanilla" build without additional apps? That would allow people to update apps themselves without having to wait for a new CopperheadOS zip.

Btw: Do you plan to offer a "vanilla" build without additional apps? That would allow people to update apps themselves without having to wait for a new CopperheadOS zip.

@thestinger

This comment has been minimized.

Show comment Hide comment
@thestinger

thestinger Feb 11, 2016

Contributor

No, not planning on doing that. The builds take a long time. SMSSecure isn't an additional app anyway, it's a replacement for Messenger.

Contributor

thestinger commented Feb 11, 2016

No, not planning on doing that. The builds take a long time. SMSSecure isn't an additional app anyway, it's a replacement for Messenger.

@vanitasvitae

This comment has been minimized.

Show comment Hide comment
@vanitasvitae

vanitasvitae Feb 11, 2016

Ok, thank you :) Btw: Tried to reproduce the crash with logcat running, but no success so far.

Ok, thank you :) Btw: Tried to reproduce the crash with logcat running, but no success so far.

@vanitasvitae

This comment has been minimized.

Show comment Hide comment
@vanitasvitae

vanitasvitae Feb 12, 2016

Just found out: the keyboard crashes each and every time I write "send2" on German layout. On English layout I can write that without a crash.

Just found out: the keyboard crashes each and every time I write "send2" on German layout. On English layout I can write that without a crash.

@vanitasvitae

This comment has been minimized.

Show comment Hide comment
@vanitasvitae

vanitasvitae Feb 12, 2016

Also crash when writing "meine,"

Also crash when writing "meine,"

@thestinger

This comment has been minimized.

Show comment Hide comment
@thestinger

thestinger Feb 12, 2016

Contributor

Thanks, that should be enough to work around it. Can look into fixing the apparent out-of-bounds access in LatinIME later. It's almost certainly a sanitizer violation, and the only one enabled there is the bounds sanitizer since that's globally enabled.

Contributor

thestinger commented Feb 12, 2016

Thanks, that should be enough to work around it. Can look into fixing the apparent out-of-bounds access in LatinIME later. It's almost certainly a sanitizer violation, and the only one enabled there is the bounds sanitizer since that's globally enabled.

@thestinger thestinger added the upstream label Feb 12, 2016

@thestinger thestinger changed the title from AOSP Keyboard crashes to -fsanitize=bounds detects a buffer overflow in LatinIME Feb 12, 2016

@thestinger

This comment has been minimized.

Show comment Hide comment
@thestinger

thestinger Feb 12, 2016

Contributor

This should no longer abort with the latest release (2016.02.12.00.30.42). The issue can stay open and track progress on re-enabling -fsanitize=bounds for LatinIME.

Contributor

thestinger commented Feb 12, 2016

This should no longer abort with the latest release (2016.02.12.00.30.42). The issue can stay open and track progress on re-enabling -fsanitize=bounds for LatinIME.

@vanitasvitae

This comment has been minimized.

Show comment Hide comment
@vanitasvitae

vanitasvitae Feb 12, 2016

No more crashes for me when typing "send2" or "meine,". Nice!

No more crashes for me when typing "send2" or "meine,". Nice!

@amilopowers

This comment has been minimized.

Show comment Hide comment
@amilopowers

amilopowers Feb 12, 2016

Seems to work here as well! Thank you very much.

Seems to work here as well! Thank you very much.

@thestinger thestinger removed this from the Release milestone Feb 21, 2016

@thestinger

This comment has been minimized.

Show comment Hide comment
@thestinger

thestinger Sep 16, 2016

Contributor

This is going to have to be revisited in Nougat once -fsanitize=bounds is enabled for C++ again.

Contributor

thestinger commented Sep 16, 2016

This is going to have to be revisited in Nougat once -fsanitize=bounds is enabled for C++ again.

@thestinger thestinger closed this Sep 16, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment