Log of #ghostscript at irc.freenode.net.

Search:
 <<<Back 1 day (to 2018/01/25)20180126 
enometh -dREALLYDELAYEDBIND still makes pstotext barf with Error: /undefined in NOBIND05:34.05 
  DELAY*BIND05:35.03 
  this worked with 9.1805:40.31 
  why is kensharp on this mission from hell to remove delaybind and nobind05:53.00 
  at least doc/History9.htm gives a commit 0a41e707 that I can try torevert05:54.42 
  fwiw i reverted both patches06:00.41 
  where do you get the Halftone or the openwin/* truetype resources that gs looks for06:01.15 
kens enometh (for the logs) because those options are a *massive* security hole. They were removed as part of a much, much wider removal of non-standard PostScript oeprators. Why ? Because of all the security reports we kept getting which were centered on those operators and features.07:57.41 
  And in any event, DELAYBIND has been re-instated. Also as far as I know, REALLYDELAYBIND works perfectly well, its the identical code from DELAYBIND with the name changed.07:58.16 
  Resources \re all stored in ghostpdl/Resource/Init07:58.45 
  There's no such thing as an openwin resoruce, or a TrueType resource07:59.04 
enometh sigh ghostscript was a stable project earlier10:21.55 
kens It still is10:22.05 
  As the message said. if you have a reason for using teh deprecated features, then talk to us10:22.28 
  And before you say it, we've tried asking for feedback before removing stuff. Nobody responds10:22.49 
enometh no now its something else10:23.03 
kens Well like I said, we removed *lots* of non-standard stuff, because we were getting security reports, and it was (perhaps surpsisingly) being exploited in the wild10:23.36 
  So again, if you have a problem, talk to us10:23.48 
  Sitting carping doesn't actually help anyone10:24.01 
enometh i'm trying to find this one, before reverting..10:24.26 
kens You could always just use an old release if its that big a problem to you. I believe a lto of distros are still shipping versions of Ghostscript which are anything up to 10 years old.10:25.37 
enometh kens, i don't buy the security narrative10:25.48 
  thats just what i meant when i said "used to be stable". stable deve.10:26.04 
  now its just like any other manipulated project10:26.15 
kens You may not buyt it, but if you look through our bug reports you'll find plenty of security problems.10:26.29 
  And also one that blew up on us badly last year10:26.40 
enometh there is no fix for those10:26.44 
kens Umm, there is10:26.54 
  We fixed all of them10:26.59 
enometh removing functionality is not a fix10:27.04 
kens Sure it is10:27.14 
enometh back to my point10:27.21 
kens That doesn't make it not stabl;e.10:27.31 
enometh this used to be a stable project before it got taken over10:27.41 
kens If you want stable you can use an old version10:27.41 
  LOL taken over ? ROFLMAO10:27.52 
enometh by the security ratrace bottomfeeders10:27.57 
kens Thye have nothing to do with what we choose to implement10:28.16 
  Non-standard PostScript5 extensions are not part of the language, so removing them should nto be a problem.10:28.35 
enometh one sec let me try to find this other issue10:28.39 
kens And as I (keep) saying, if people have a genuine need for them then we will reconsider10:28.52 
  But since (as I also said) tehre's no way to find out if people are using vulnerable non-standard stuff without removing it....10:29.20 
enometh sorry kens, that argument is defective10:29.54 
kens Well we will have to agree to disagree then10:30.04 
enometh it covers a defect in the developer10:30.14 
kens Oh personal epithers now ?10:30.22 
enometh hmm this seems to be a `a4' beginpapersize10:40.37 
kens beginpapersize isn't standard PostScript. Its also not (afaik) ever been a Ghostscript extension10:41.21 
  So presumably its a procedure defined in your PostScript program10:41.47 
  a4 is still defined in statusdict, that has not changed10:42.15 
enometh i still dont know what the problem is, but for this file, my use-case problem goes away if i remove a4 from the TexDict of the ps file. these some ps are decades old10:43.23 
kens Can't really comment without seeing teh program10:43.48 
  But that's (obviously) going to override the Ghostscript definition.10:44.11 
  Presumably something in the TexDict procedure is doign something which causes a problem10:44.32 
enometh I can't figure this out from the release. let me see if i can get a git clone11:11.34 
kens You could simply put the PostScript program somewhere public and let us look at it11:11.54 
enometh oh i'm just trying to use pstotext, it breaks on many ps programs11:12.26 
  you mean the program generated by pstotext11:12.49 
kens Also, of course, if you clone the current code, it won't match the release, becasue that's about 5 months old11:12.51 
  I mean the PostScript program you are feeding to Ghostscript11:13.01 
enometh it breaks on most of them..11:13.26 
kens Note that Ghostscript can extract text from PostScript and PDF input using the txtwrite device.11:13.27 
  that doesn't really help11:13.35 
  I need something I can look at, ideally something small11:13.48 
enometh yeah. i tried cloning ghostpdl from github but that didnt do anything11:13.53 
  from where i got the release..11:14.14 
kens Should work, but I'm no expert with Github11:14.17 
  You'd be better using our repository11:14.25 
enometh this is a wrong url isnt it git clone git://github.com/ArtifexSoftware/ghostpdl11:14.57 
kens I can''t really tell, I don't use Github11:15.15 
  Git hub is supposed to be a mirror of our git repository, which is why I say you;d be better using ours11:15.38 
enometh i can give you a quick test case if i can do git log -G..11:15.40 
  but i'm running out of time. it may have to wait till sunday11:15.58 
kens Well, I won't be working Sunday....11:16.09 
  But I can read the logs on Monday11:16.15 
enometh i'm quite slow. let me try getting this compiled on a guest box..11:17.57 
kens Good grief Github has 279 hits for Ghostscript11:18.28 
enometh i got it from git.ghostscript.com..11:18.51 
kens Oh well that's not Github, that's us11:19.02 
enometh note the first githun url i mentioned gives a sparse repo or something11:19.27 
  or maybe it uses submodules11:19.35 
kens No we don't use submodules11:19.42 
enometh now i already have the distro gs on this machine. if i want to be able to bisect from the source tree, should i configure --prefix=/tmp/gs-root/usr, install there and call the binary from there?11:22.01 
  or is there a better method11:22.15 
kens I'm not sure what configure has to do with bisecting11:22.28 
enometh i'm assuming before bisecting you have to install it11:22.49 
kens Personally when bisecting I just build and use the local binary, I don't install it11:22.51 
enometh it wont pick up the systemwide files?11:23.03 
  if i use a local binary?11:23.17 
kens Which system wide files did you mean ?11:23.19 
enometh the .ps files it installs11:23.27 
kens The default build puts everything into the binary11:23.32 
enometh oh yeah11:23.39 
kens In a ROM file system11:23.41 
enometh when i was tracing this i thought i saw it was picking up stuff from /usr/share/ghostscript/9.22/lib/11:24.34 
kens The release may well do so11:24.48 
enometh will the local try to do it too?11:25.05 
  hopefully not. ok11:25.08 
kens Distros often change the build so that it doesn't use a ROM file system. THey also use shared libraries for things like FreeType, OpenJPEG etc11:25.15 
enometh ok thx11:25.32 
kens Our default build puts everything in the ROM file system11:25.36 
enometh let me get to the point of reproducing the failure..11:25.52 
kens So as long as you don't use -I to include other search paths, nothing should be external11:25.54 
enometh sigh pstotext hardcodes /usr/bin/gs11:38.43 
  and i cant revert those patches with head without conflicts11:43.20 
kens As I said, you could just let us look at the PostScript program11:48.13 
enometh well for examplehttp://www.linux-usb.org/USB-guide/USB-guide.ps12:10.29 
  after reverting 0a41e707c and 8f79677312:11.10 
  i'm trying to see where pdftotext -debug chokes on it12:11.41 
kens File runs perfectly well as far as I can see.12:11.52 
  When sent to Ghostscript12:12.05 
enometh the failing program is pstotext12:12.16 
kens Then I need to see what pstotext is sending.12:12.31 
  And teh command line its using12:12.50 
  Oh I see pstotext is 'no longer maintained'12:13.20 
  I'd suggest using txtwrite instead then, at least that's maintained12:13.32 
  Anyway, lunchtime12:13.58 
enometh now calling ./pstotext -debughttp://www.linux-usb.org/USB-guide/USB-guide.ps doesnt even startup gs12:18.32 
  gs bails with Unrecoverable error: undefined in git. apparently the reverts didnt work like they did with my release build12:19.01 
  pstotext is available from http://us.archive.ubuntu.com/ubuntu/pool/universe/p/pstotext/pstotext_1.9.orig.tar.gz for example12:19.42 
  i'm also out of time. maybe on monday12:19.50 
  until then i'm going back to ghostscript-x11-9.0012:20.14 
  which was working great!12:20.18 
  so it gets called like:16:54.09 
  gs -r72 -dNODISPLAY -dFIXEDMEDIA -dDELAYBIND -dWRITESYSTEMDICT -dNOPAUSE -dSAFER ocr.ps -- <psfile>16:55.30 
  ocr.ps is in that tarball i pointed above16:55.47 
kens yeah, not re-instting WRITESYSTEMDICT16:56.15 
  and that's your problem16:56.25 
enometh i read the warning message i didnt follow it16:56.37 
  let me try again16:56.54 
  kens i dont understand what you meant16:59.50 
kens the code won't work without WRITESYSTEMDICT17:00.23 
enometh apparently it wont..17:01.53 
  Error: /undefined in --setpagedevice--17:04.22 
  when it encouters some systemdict. I still dont understand whats expected and whats not happening17:04.46 
  what do uou mean "not re-instting" ?17:05.21 
kens The code wants to write to systemdict, which is not legal17:05.34 
  I mean we will not re-instate the flag17:05.52 
enometh what>17:06.00 
kens Its a massive security nightmare17:06.03 
  WRITESYSTEMDICT17:06.22 
enometh how do i revert it in my local copy17:06.23 
kens no idea17:06.33 
enometh the warning says it works17:06.34 
  how did you remove it?17:06.39 
  which commit17:06.44 
kens don't remember, not really interested17:07.00 
enometh ghostscript prints out: *** WARNING - you have selected SAFER, indicating you want Ghostscript to execute in a safer environment, but at the same time have selected DELAYBIND. Unless you use this option with care (and specifically, remember to call .bindnow) it is possible that malicious code may be able to evade the limited security offered by the SAFER option.17:07.11 
  and youre saying there is no flag?>17:07.19 
kens No17:07.37 
  I'm talking about WRITESYTEMDICT17:07.54 
  I never mentioned SAFER17:08.04 
enometh sigh. it also prints out:17:08.49 
  *** WARNING - you have selected SAFER, indicating you want Ghostscript to execute in a safer environment, but at the same time have selected WRITESYSTEMDICT. Unless you use this option with care and specifically, remember to execute code like: "systemdict readonly pop" it is possible that malicious code may be able to evade the limited security offered by the SAFER option.17:08.58 
kens oddly I thought it wasn't removed17:09.14 
enometh what are you saying17:09.24 
  and if you see ocr.ps it does have a systemdict readonly pop17:09.30 
kens and in fact its still present, must be something else17:09.35 
  Frankly, I don't really care. Its an unsupported tool relying on dangerous non-stabdard extensions.17:10.26 
enometh sigh17:10.28 
  yeah you shouldnt have removed ps2ascii either. your comments indicate you dont know the use cases, and you dont know how to provide it back17:10.36 
kens and there exists a doumented, safe way to achieve text output17:10.46 
enometh it is inadequate and buggy17:10.58 
  you are aware of the inadequacies17:11.06 
kens then report bugs17:11.07 
enometh so you can answer your customers like this?17:11.24 
kens you are not a customer17:11.40 
enometh there wont be a reason if you handt removed the functionality in the first place17:11.45 
  hey now you have customers. thats what i call a racket17:11.58 
kens or if you are you have not identified yourself as such17:12.06 
  we've always had customers that's what pays for your free loading17:12.28 
chrisl enometh: if you continue to be rude or abusive, you'll not be welcome on this channel going forwards17:13.20 
enometh its a shame for open source really that someone pays developers to put in bugs tto create issues with a security narrative , which they have no clue about17:13.21 
kens kick #ghostscript enometh17:13.25 
 Forward 1 day (to 2018/01/27)>>> 
ghostscript.com #mupdf
Search: