This file is indexed.

/usr/share/rats/rats-python.xml is in rats 2.3-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
<?xml version="1.0"?>
<!DOCTYPE RATS [
<!ENTITY randdesc "Standard random number generators should not be used to 
generate randomness used for security reasons.  For security sensitive randomness a crytographic randomness generator that provides sufficient entropy should be used.">
<!ENTITY bufbig "Double check that your buffer is as big as you specify">
<!ENTITY bufloop "Check buffer boundaries if calling this function in a loop and make sure you are not in danger of writing past the allocated space.">
<!ENTITY bufreasonable "Truncate all input strings to a reasonable length before
passing them to this function">
<!ENTITY tmpfile "Many calls for generating temporary file names are insecure (susceptible to race conditions).  Use a securely generated file name, for example, by pulling 64 bits of randomness from /dev/random, base 64 encoding it and using that as a file suffix.">
<!ENTITY dns "DNS results can easily be forged by an attacker (or arbitrarily set to large values, etc), and should not be trusted."> 

]>
<VulnDB  lang="python">

  <Vulnerability>
    <Name>access</Name>
    <RaceCheck>1</RaceCheck>
  </Vulnerability>

  <Vulnerability>
    <Name>mkfifo</Name>
    <RaceUse>1</RaceUse>
  </Vulnerability>

  <Vulnerability>
    <Name>pathconf</Name>
    <RaceUse>1</RaceUse>
  </Vulnerability>

  <Vulnerability>
    <Name>listdir</Name>
    <RaceUse>1</RaceUse>
  </Vulnerability>

  <Vulnerability>
   <Name>open</Name>
   <RaceUse>1</RaceUse>
  </Vulnerability>

  <Vulnerability>
    <Name>lstat</Name>
    <RaceCheck>1</RaceCheck>
  </Vulnerability>

  <Vulnerability>
    <Name>stat</Name>
    <RaceCheck>1</RaceCheck>
  </Vulnerability>

  <Vulnerability>
    <Name>chmod</Name>
    <RaceUse>1</RaceUse>
  </Vulnerability>

  <Vulnerability>
    <Name>chown</Name>
    <RaceUse>1</RaceUse>
  </Vulnerability>

  <Vulnerability>
    <Name>rename</Name>
    <RaceUse>1</RaceUse>
  </Vulnerability>

  <Vulnerability>
    <Name>mkdir</Name>
    <RaceUse>1</RaceUse>
  </Vulnerability>

  <Vulnerability>
    <Name>rmdir</Name>
    <RaceUse>1</RaceUse>
  </Vulnerability>

  <Vulnerability>
    <Name>remove</Name>
    <RaceUse>1</RaceUse>
  </Vulnerability>

  <Vulnerability>
    <Name>unlink</Name>
    <RaceUse>1</RaceUse>
  </Vulnerability>

  <Vulnerability>
    <Name>link</Name>
    <RaceUse>1</RaceUse>
  </Vulnerability>

  <Vulnerability>
    <Name>execv</Name>
    <RaceUse>1</RaceUse>
  </Vulnerability>

  <Vulnerability>
    <Name>execve</Name>
    <RaceUse>1</RaceUse>
  </Vulnerability>

  <Vulnerability>
    <Name>execl</Name>
    <RaceUse>1</RaceUse>
  </Vulnerability>

  <Vulnerability>
    <Name>execlp</Name>
    <RaceUse>1</RaceUse>
  </Vulnerability>

  <Vulnerability>
    <Name>execle</Name>
    <RaceUse>1</RaceUse>
  </Vulnerability>

  <Vulnerability>
    <Name>execvp</Name>
    <RaceUse>1</RaceUse>
  </Vulnerability>

  <Vulnerability>
    <Name>random</Name>
    <Info>
      <Severity>Medium</Severity>
      <Description>&randdesc;</Description>
    </Info>
  </Vulnerability>

  <Vulnerability>
    <Name>randint</Name>
    <Info>
      <Severity>Medium</Severity>
      <Description>&randdesc;</Description>
    </Info>
  </Vulnerability>

  <Vulnerability>
    <Name>randrange</Name>
    <Info>
      <Severity>Medium</Severity>
      <Description>&randdesc;</Description>
    </Info>
  </Vulnerability>


  <Vulnerability>
    <Name>setstate</Name>
    <Info>
      <Severity>Medium</Severity>
      <Description>&randdesc;</Description>
    </Info>
  </Vulnerability>

  <Vulnerability>
    <Name>whseed</Name>
    <Info>
      <Severity>Medium</Severity>
      <Description>&randdesc;</Description>
    </Info>
  </Vulnerability>

  <Vulnerability>
    <Name>getstate</Name>
    <Info>
      <Severity>Medium</Severity>
      <Description>&randdesc;</Description>
    </Info>
  </Vulnerability>

  <Vulnerability>
    <Name>jumpahead</Name>
    <Info>
      <Severity>Medium</Severity>
      <Description>&randdesc;</Description>
    </Info>
  </Vulnerability>

  <Vulnerability>
    <Name>shuffle</Name>
    <Info>
      <Severity>Medium</Severity>
      <Description>&randdesc;</Description>
    </Info>
  </Vulnerability>


  <Vulnerability>
    <Name>choice</Name>
    <Info>
      <Severity>Medium</Severity>
      <Description>&randdesc;</Description>
    </Info>
  </Vulnerability>

  <Vulnerability>
    <Name>uniform</Name>
    <Info>
      <Severity>Medium</Severity>
      <Description>&randdesc;</Description>
    </Info>
  </Vulnerability>


  <Vulnerability>
    <Name>betavariate</Name>
    <Info>
      <Severity>Medium</Severity>
      <Description>&randdesc;</Description>
    </Info>
  </Vulnerability>

  <Vulnerability>
    <Name>seed</Name>
    <Info>
      <Severity>Medium</Severity>
      <Description>&randdesc;</Description>
    </Info>
  </Vulnerability>


  <Vulnerability>
    <Name>cunifvariate</Name>
    <Info>
      <Severity>Medium</Severity>
      <Description>&randdesc;</Description>
    </Info>
  </Vulnerability>


  <Vulnerability>
    <Name>expovariate</Name>
    <Info>
      <Severity>Medium</Severity>
      <Description>&randdesc;</Description>
    </Info>
  </Vulnerability>

  <Vulnerability>
    <Name>gamma</Name>
    <Info>
      <Severity>Medium</Severity>
      <Description>&randdesc;</Description>
    </Info>
  </Vulnerability>

  <Vulnerability>
    <Name>gauss</Name>
    <Info>
      <Severity>Medium</Severity>
      <Description>&randdesc;</Description>
    </Info>
  </Vulnerability>

  <Vulnerability>
    <Name>lognormvariate</Name>
    <Info>
      <Severity>Medium</Severity>
      <Description>&randdesc;</Description>
    </Info>
  </Vulnerability>

  <Vulnerability>
    <Name>normalvariate</Name>
    <Info>
      <Severity>Medium</Severity>
      <Description>&randdesc;</Description>
    </Info>
  </Vulnerability>

  <Vulnerability>
    <Name>vonmisesvariate</Name>
    <Info>
      <Severity>Medium</Severity>
      <Description>&randdesc;</Description>
    </Info>
  </Vulnerability>

  <Vulnerability>
    <Name>paretovariate</Name>
    <Info>
      <Severity>Medium</Severity>
      <Description>&randdesc;</Description>
    </Info>
  </Vulnerability>

  <Vulnerability>
    <Name>weibullvariate</Name>
    <Info>
      <Severity>Medium</Severity>
      <Description>&randdesc;</Description>
    </Info>
  </Vulnerability>

  <Vulnerability>
    <Name>system</Name>
    <InputProblem>
      <Arg>1</Arg>
      <Severity>High</Severity>
    </InputProblem>
  </Vulnerability>

  <Vulnerability>
    <Name>popen</Name>
    <InputProblem>
      <Arg>1</Arg>
      <Severity>High</Severity>
    </InputProblem>
  </Vulnerability>

  <Vulnerability>
    <Name>exec</Name>
    <InputProblem>
      <Arg>1</Arg>
      <Severity>High</Severity>
    </InputProblem>
  </Vulnerability>

  <Vulnerability>
    <Name>execfile</Name>
    <InputProblem>
      <Arg>1</Arg>
      <Severity>High</Severity>
    </InputProblem>
  </Vulnerability>

  <Vulnerability>
    <Name>eval</Name>
    <InputProblem>
      <Arg>1</Arg>
      <Severity>High</Severity>
    </InputProblem>
  </Vulnerability>

  <Vulnerability>
    <Name>input</Name>
    <Input/>
    <InputProblem>
      <Arg>1</Arg>
      <Severity>High</Severity>
    </InputProblem>
  </Vulnerability>

  <Vulnerability>
    <Name>compile</Name>
    <InputProblem>
      <Arg>1</Arg>
      <Severity>High</Severity>
    </InputProblem>
  </Vulnerability>

  <Vulnerability>
    <Name>tmpfile</Name>
    <Info>
      <Description>&tmpfile;</Description>
      <Severity>Medium</Severity>
    </Info>
  </Vulnerability>
  <Vulnerability>
    <Name>tmpnam</Name>
    <Info>
      <Description>&tmpfile;</Description>
      <Severity>Medium</Severity>
    </Info>
  </Vulnerability>

  <Vulnerability>
    <Name>getlogin</Name>
    <Info>
      <Description> The results of this call are easy to forge.  </Description>
      <Severity>Medium</Severity>
    </Info>
  </Vulnerability>

  <Vulnerability>
    <Name>ttyname</Name>
    <Info>
      <Description>
      The results are easy for an attacker to forge, and not reliable.
      </Description>
    </Info>  
  </Vulnerability>

<!-- Functions that are known input sources, but not otherwise problems -->

  <Vulnerability>
    <Name>raw_input</Name>
    <Input/>
  </Vulnerability>
  <Vulnerability>
    <Name>read</Name>
    <Input/>
  </Vulnerability>
  <Vulnerability>
    <Name>recvfrom</Name>
    <Input/>
  </Vulnerability>
  <Vulnerability>
    <Name>recv</Name>
    <Input/>
  </Vulnerability>

  <Vulnerability>
    <Name>signal</Name>
    <Info>
      <Description>
      When setting signal handlers, do not use the same function to handle multiple signals. There exists the possibility a race condition will result if 2 or more different signals are sent to the process at nearly the same time. Also, when writing signal handlers, it is best to do as little as possible in them. The best strategy is to use the signal handler to set a flag, that another part of the program tests and performs the appropriate action(s) when it is set.
      </Description>
      <URL>http://razor.bindview.com/publish/papers/signals.txt</URL>
      <Severity>Medium</Severity>
    </Info>
  </Vulnerability>

<!-- Added by Viega: obvious from the book.  Also show up on
     Shostack's page. -->
  <Vulnerability>
    <Name>gethostbyname</Name>
    <Info>
      <Description>&dns;</Description>
      <Severity>High</Severity>
    </Info>
  </Vulnerability>

  <Vulnerability>
    <Name>gethostbyname_ex</Name>
    <Info>
      <Description>&dns;</Description>
      <Severity>High</Severity>
    </Info>
  </Vulnerability>

  <Vulnerability>
    <Name>gethostbyaddr</Name>
    <Info>
      <Description>&dns;</Description>
      <Severity>High</Severity>
    </Info>
  </Vulnerability>

<!-- Added by Viega.  From Peter Guttman's thesis. -->
  <Vulnerability>
    <Name>fork</Name>
    <Info>
      <Description>
      Remember that sensitive data get copied on fork.  For example, a random
      number generator's internal state will get duplicated, and the child
      may start outputting identical number streams.
      </Description>
      <Severity>Low</Severity>
   </Info> 
  </Vulnerability>
</VulnDB>